<!DOCTYPE> |
Document Type |
Begin every document with this. Tells browser to render HTML code as HTML5. |
<html> |
Hyper Text Markup Language |
Root element. Other elements are descendants of this element. |
<head> |
Head |
Metadata about the page (title, stylesheets, scripts). |
<title> |
Title |
Shows in browser tab. Important for SEO! |
|
|
|
<body> |
Body |
Content on the page (headers, body, footer). |
<header> |
Header |
Main header. Introductory content or nav links often go here. |
<h1 to h6> |
Headings |
Heading sizes (h1 is largest, h6 smallest). |
<main> |
Main |
Contains main content of web page. |
<nav> |
Navigation Bar |
Set of links. Modern design is usually horizontal bar at top of page. |
<section> |
Section |
Standalone section of content. |
<aside> |
Aside |
Content is indirectly related to main content. |
<address> |
Address |
Contact information. |
<footer> |
Footer |
Copyright data, author information, links, social media can go here. |
|
|
|
<div> |
Div |
Generic container for html elements. Don't overuse. |
<ul> |
Unordered List |
Bullet point list, not numbered. |
<ol> |
Ordered List |
Numbered list. |
<li> |
List Item |
Actual line of text in list. |
<p> |
Paragraph |
Use for text, both single line and paragraph. |