HTML & CSS - gpk2000/Wiki GitHub Wiki

My Notes on HTML and CSS

HTML

  • 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 p tag is used for paragraphs. You can emphasize text in a paragraph using em and strong tags (note that they are not "just" same as italics and bold).
  • There are h1, h2, ..., h5 tags for headings from strong to the least strength (i.e h1 being the strongest). In general h1 tag is used only once whereas the other can be used multiple times.
  • The ul and ol tags represent unordered and ordered list respectively.
  • An anchor tag a is used to define a link, but you also need to define the destination of that link.
  • The img tag is used to put an image in HTML document, the alt attribute 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.
⚠️ **GitHub.com Fallback** ⚠️