HTML & CSS - gpk2000/Wiki GitHub Wiki
- The basic structure of an HTML document includes tags, which surround content and apply meaning to it.
- The first line on the top of html files is
<!DOCTYPE html>, is a document type declaration and it lets the browser know which flavor of HTML you're using. - The stuff between
<body>and</body>is the main content of the document that will appear in the browser window. - Tags can also have attributes, which are extra bits of information. Attributes appear inside the opening tag and their values sit inside quotation marks.
<tag attribute="value">Content</tag>
- The head element appears before the body element and contains information about the webpage.
- The
ptag is used for paragraphs. You can emphasize text in a paragraph usingemandstrongtags (note that they are not "just" same as italics and bold). - There are
h1, h2, ..., h5tags for headings from strong to the least strength (i.eh1being the strongest). In generalh1tag is used only once whereas the other can be used multiple times. - The
ulandoltags represent unordered and ordered list respectively. - An anchor tag
ais used to define a link, but you also need to define the destination of that link. - The
imgtag is used to put an image in HTML document, thealtattribute is the alternative description. This is an accessibility consideration, providing meaningful image for users who are unable to view the image. - forms are used to collect data inputted by the user. The basic tags used in HTML of forms are
form, input, textarea, select, option.