Sikau

HTML · Day 2 · about 20 min

Headings and paragraphs

Give your page an outline.

Pages have outlines

Readers skim headings to find what they need — and so do screen readers and search engines. HTML has six heading levels, <h1> to <h6>, that build a page's outline like chapters and sections in a book.

Heading levels

  • Use one <h1> per page, for its main title.
  • Don't skip levels going down: after h2 comes h3, not h4.
  • Choose headings by meaning, not size. Size is CSS's job.
  • <p> is a paragraph. <br> forces a line break (no closing tag), but most of the time a new paragraph is better.

The rest of this lesson

  • Who reads your headingsexplain
  • Paragraphs, line breaks and spacesexplain
  • What's wrong?predict
  • Outline a pageorder
  • Your turnwrite code
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 17 lessons of HTML