edubun
English
1 / 16

3 / 10 · Intro

Headings and paragraphs

HTML has six heading levels, h1 to h6, and screen reader users often jump from heading to heading to find their way around a page.

Jump to the 10 practice questions

You will learn

  • Build an outline with h1 to h6 without skipping levels
  • Write paragraphs and line breaks where they belong
  • Mark quotations with blockquote

Before this: Tags and elements

1Explain

An outline made of headings

Think of a recipe book. The book has a title, each recipe has a name, and each recipe has smaller parts such as Ingredients and Method. HTML expresses the same outline with six heading elements, <h1> through <h6>. <h1> is the top level, usually the title of the page.

Your code
<h1>Weekend Baking</h1>
<p>Three simple breads you can make at home.</p>

<h2>Soda bread</h2>
<h3>Ingredients</h3>
<p>Flour, baking soda, salt and buttermilk.</p>
<h3>Method</h3>
<p>Mix, shape into a round and bake for 40 minutes.</p>

<h2>Flatbread</h2>
<p>Ready in 20 minutes, no oven needed.</p>
Preview

2Explore

Pick the level by structure

Two habits keep the outline clean. First, use one <h1> per page for its main title; MDN recommends this, and it is what most users expect. Second, do not skip levels on the way down: after an h2 comes an h3, not an h5. Going back up is fine, so an h3 can be followed by a new h2 when the next section starts.

The level changes the size, but its job is to place the heading in the outline: under an h1, the next level is h2.

Tap a choice: the code and the preview change together.

Heading level
<h1>Recipes</h1>
<h2>Soda bread</h2>
<p>No yeast, no waiting.</p>
Preview

3Problem

How many h1?

How many h1 elements should a typical page have?

Hint

One main title per page.

Solution

Answer: 1

One h1 for the main title, as MDN recommends.

4Problem

After an h2

After an h2, which heading should start a subsection?

Hint

Do not skip a level.

Solution

Answer: h3

Go down one level at a time; skipping to h5 breaks the outline.

5Explain

Example: an outline from a table of contents

A small book has a title, two chapters, and two sections in the first chapter. Give each line a heading level.

  1. The book title is the top of the outline: h1.
  2. The chapters Starters and Shaping sit one level down: h2.
  3. Feeding and Storing are parts of Starters, one more level down: h3.
  4. Shaping starts a new chapter, so the outline goes back up to h2. Going back up is fine; jumping down two levels is not.
Your code
<h1>Bread at Home</h1>
<h2>Starters</h2>
<h3>Feeding</h3>
<h3>Storing</h3>
<h2>Shaping</h2>
Preview

6Problem

Back up a level

<h1>Garden Club</h1>
<h2>Vegetables</h2>
<h3>Tomatoes</h3>
<h2>Flowers</h2>

Is this outline correct?

Hint

Only a jump down past a level breaks an outline.

Solution

Answer: Yes: going back up from h3 to h2 is fine

Flowers is a new part at the same level as Vegetables, so it is an h2 again. Going back up is always fine; only a jump down, such as h2 to h4, skips a level.

7Explore

Paragraphs and line breaks

Running text goes in <p> elements, one per paragraph. Because HTML collapses white space, pressing Enter twice in your file does not create a new paragraph on screen; only a new <p> does. Browsers add a gap above and below each paragraph by default, which CSS can change. A paragraph cannot contain another paragraph or a heading, so if you forget a closing </p>, the browser closes it for you as soon as the next block element starts.

Extra spaces and line breaks in the file collapse into one space. A new paragraph needs a new p; a line break inside one needs br.

Tap a choice: the code and the preview change together.

Inside p
<p>Line one
   Line two</p>
Preview

8Problem

Enter twice inside p

You press Enter twice between two sentences inside one p. What appears?

Hint

White space in the file collapses.

Solution

Answer: A single space

White space, line breaks included, collapses into one space.

9Problem

The source of a long quotation

A blockquote copies a paragraph from another web page. Which attribute holds the address of that page?

Hint

It is not an attribute of a link or an image.

Solution

Answer: cite

cite on blockquote holds the address of the source. Browsers do not show it, so if readers should see where the words come from, name the source in the text as well. href belongs to links, src to images.

10Explain

Quotations

A longer quotation from another source goes in <blockquote>, which browsers indent. Put the quoted paragraphs inside it, and you can give the source address in its cite attribute. A short quotation inside a sentence uses <q>, and the browser adds quotation marks for you. The <cite> element marks the title of a work, such as a book or a film.

Your code
<blockquote cite="https://example.com/baking">
  <p>Good bread needs time more than skill.</p>
</blockquote>
<p>From a baking guide</p>
Preview

11Problem

A short quotation

A few quoted words sit inside a sentence. Which element marks them?

Hint

The long form is indented as its own block; the short form stays in the sentence.

Solution

Answer: q

q is for a short quotation inside a sentence, and the browser adds the quotation marks. blockquote is for a longer one; cite marks the title of a work.

12Problem

A change of topic

Which element marks a change of topic, drawn as a line?

Hint

It is a void element drawn as a line.

Solution

Answer: hr

hr is the thematic break.

13Practice

Headings for the bike club

Turn Bike Club into an <h1>, and Routes and Joining into <h2> headings. Leave the other lines as paragraphs.

Checks
  • h1 Bike Club
  • two h2 headings
  • paragraph after Routes
  • three paragraphs left
Your code
<p>Bike Club</p>
<p>We ride every Saturday morning.</p>
<p>Routes</p>
<p>Most rides are 30 to 50 km on quiet roads.</p>
<p>Joining</p>
<p>Come to the park gate at 8 am with a helmet.</p>
Preview
Hint

Change only the tag names of three lines: p becomes h1 or h2.

A solution
<h1>Bike Club</h1>
<p>We ride every Saturday morning.</p>
<h2>Routes</h2>
<p>Most rides are 30 to 50 km on quiet roads.</p>
<h2>Joining</h2>
<p>Come to the park gate at 8 am with a helmet.</p>

14Practice

An address on three lines

Put the shop name, the street and the town on three separate lines with <br>.

Checks
  • two line breaks
  • address kept
Your code
<address>
  Corner Bakery 12 Mill Street Springfield
</address>
Preview
Hint

Two br elements make three lines.

A solution
<address>
  Corner Bakery<br>
  12 Mill Street<br>
  Springfield
</address>

15Explain

Common mistakes

Mistake
<h1>Bike Club</h1>
<h4>Routes</h4>
<p>Quiet roads.</p>
Fixed
<h1>Bike Club</h1>
<h2>Routes</h2>
<p>Quiet roads.</p>

h4 was picked because it looked smaller. The outline then jumps from level 1 to level 4; use h2 and change the size with CSS.

16

Summary

  • h1 to h6 build an outline: one h1, then go down one level at a time.
  • Choose heading levels by structure; change size with CSS.
  • One p per paragraph; br only where line breaks are content; hr for a change of topic.

Next unitLinks
Full text · The whole lesson as one text

An outline made of headings

Think of a recipe book. The book has a title, each recipe has a name, and each recipe has smaller parts such as Ingredients and Method. HTML expresses the same outline with six heading elements, <h1> through <h6>. <h1> is the top level, usually the title of the page. <h2> marks the main sections, <h3> the parts inside a section, and so on. Most pages never need more than three or four levels.

<h1>Weekend Baking</h1>
<p>Three simple breads you can make at home.</p>

<h2>Soda bread</h2>
<h3>Ingredients</h3>
<p>Flour, baking soda, salt and buttermilk.</p>
<h3>Method</h3>
<p>Mix, shape into a round and bake for 40 minutes.</p>

<h2>Flatbread</h2>
<p>Ready in 20 minutes, no oven needed.</p>
One h1 for the page, h2 for each recipe, h3 for the parts of a recipe.

Pick the level by structure, not by size

Browsers draw <h1> large and <h6> small, and it is tempting to choose a heading because of its size. Resist that. The level tells software how the page is organised. Screen readers can list every heading on a page and let the user jump straight to one, much like a table of contents. Search engines also use headings to understand what a page covers. If you want an h2 to look smaller, keep it an h2 and change its size with CSS.

Two habits keep the outline clean. First, use one <h1> per page for its main title; MDN recommends this, and it is what most users expect. Second, do not skip levels on the way down: after an h2 comes an h3, not an h5. Going back up is fine, so an h3 can be followed by a new h2 when the next section starts.

Paragraphs

Running text goes in <p> elements, one per paragraph. Because HTML collapses white space, pressing Enter twice in your file does not create a new paragraph on screen; only a new <p> does. Browsers add a gap above and below each paragraph by default, which CSS can change. A paragraph cannot contain another paragraph or a heading, so if you forget a closing </p>, the browser closes it for you as soon as the next block element starts.

Sometimes the line breaks themselves are part of the content, as in a postal address or a poem. For those, use <br> at the end of each line inside one paragraph or <address>. Do not use a pile of <br> elements to make vertical space; that is a job for CSS margins. To mark a change of topic inside a section, such as a scene change in a story, use <hr>, the thematic break, which browsers draw as a horizontal line.

Quotations

A longer quotation from another source goes in <blockquote>, which browsers indent. Put the quoted paragraphs inside it, and you can give the source address in its cite attribute. A short quotation inside a sentence uses <q>, and the browser adds quotation marks for you. The <cite> element marks the title of a work, such as a book or a film.

Accessibility: a page whose headings form a sensible outline can be skimmed by everyone, including people using a screen reader, a magnifier or a phone. Read only your headings from top to bottom. If they make sense on their own, the structure is good.
Key points
  • h1 to h6 build an outline: one h1, then go down one level at a time.
  • Choose heading levels by structure; change size with CSS.
  • One p per paragraph; br only where line breaks are content; hr for a change of topic.

Practice questions from Headings and paragraphs on edubun

Embed this quiz

Free to embed. Please keep the credit line.

Sources for this course (9)
  • WHATWG, HTML Living Standard (html.spec.whatwg.org, checked 2026-10-17)
  • MDN Web Docs, Learn web development: Structuring content with HTML, and the HTML element reference (developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content and developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements, checked 2026-10-17)
  • MDN, HTML images (alt text guidance, checked 2026-10-17)
  • W3C WAI, Images tutorial and alt decision tree (w3.org/WAI/tutorials/images/decision-tree, checked 2026-10-17)
  • CERN, A short history of the Web (home.cern/science/computing/the-birth-of-the-web/short-history-web/, checked 2026-10-17)
  • W3C and WHATWG memorandum of understanding, 28 May 2019 (w3.org/2019/04/WHATWG-W3C-MOU.html, checked 2026-10-17)
  • W3C, Using ARIA, first rule of ARIA use (w3.org/TR/using-aria/, checked 2026-10-17)
  • W3C Markup Validation Service (validator.w3.org, checked 2026-10-17)
  • MDN, Viewport meta element (checked 2026-10-17).

Checked: 2026-10-17