HTML tags wrap content and tell the browser what it is. Most tags open with <name> and close with </name>.
Structure
- <!DOCTYPE html> declares an HTML5 page
- <head> holds the title and meta tags
- <title> sets the page title
- <main> holds the main content
- <header>, <nav> and <footer> mark the page regions
Text
- <h1> to <h6> are headings, with one <h1> per page
- <p> is a paragraph
- <strong> marks important text
- <em> marks emphasis
- <br> starts a new line
Links, images and lists
- <a href="/page">text</a> makes a link
- <img src="photo.jpg" alt="description"> shows an image with alt text
- <ul> with <li> makes a bullet list
- <ol> with <li> makes a numbered list