Horizontal rule (hr), online

Six activities your students do on their own devices. See who's finished, and their scores.

Horizontal rule (hr) in one minute

What students need to know

The <hr> here draws a horizontal line between the two headings. It has no content and no closing tag. <hr> is used to signal a meaningful shift in content, such as between two chapters or sections.

<hr> is self-closing - it has no content and no closing tag. Writing </hr> is invalid HTML. HTML tag names must be lowercase. The correct form is <hr> not <HR>.

Mistakes students make

  • <hr> is a self-closing element - it must not be written as </hr>. The correct form is simply <hr> with no forward slash at the start.
  • HTML tag names must be lowercase. <HR> with capital letters is non-standard. The correct form is <hr> in lowercase.
  • <hr> is self-closing and must never have a closing </hr> tag. The correct form is just <hr> or <hr/>.
  • <horizontal-rule> is not a valid HTML element. The correct self-closing element for a horizontal divider is <hr>.

Discover other journeys with this module

What students will learn in this module

Every question in Module 11

Quick questions

  1. True or false: <hr> needs a closing </hr> tag.AFalseBTrue
  2. What does the <hr> element draw on a page?AA horizontal lineBA vertical divider
  3. True or false: <HR> with capital letters is valid HTML.ATrueBFalse
  4. True or false: <hr/> and <hr> are both valid in HTML5.AFalseBTrue
  5. What kind of break does <hr> represent?AA thematic break between sectionsBA line break within a paragraph

Key terms

Students type the meaning of:

  • <hr>

Match the pairs

<p>Part one.</p>
<hr>
<p>Part two.</p>
Match it to what it does
<hr/>Match it to what it does
<hr> is self-closing - it has no content and needs no closing tagMatch it to what it does
<hr> represents a thematic break - a shift in topic or sceneMatch it to what it does
<hr></hr>Match it to what it does
<HR>Match it to what it does

Fill in the blanks

  1. <p>First section.</p>
    <___>
    <p>Second section.</p>

    Hint: Type the self-closing element that draws a horizontal dividing line

  2. <p>Topic one.</p>
    <___/>
    <p>Topic two.</p>

    Hint: Type the element name used in the self-closing horizontal rule tag

  3. <h1>Chapter One</h1>
    <___>
    <p>Content starts here.</p>

    Hint: Type the tag that places a horizontal line between sections

  4. <body>
      <p>Intro.</p>
      <___>
      <p>Conclusion.</p>
    </body>

    Hint: Type the element name that creates a thematic break with a horizontal line

  5. <h2>Part A</h2>
    <p>Details.</p>
    <___>
    <h2>Part B</h2>

    Hint: Type the self-closing tag that visually separates two sections

Spot the error

Question 1

A</hr>B<p>Section one.</p>C<p>Section two.</p>

Question 2

A<body>B  <p>Intro text.</p><HR><p>More text.</p>C  <h2>Next section</h2>D</body>

Question 3

A<h1>Title</h1>B<p>Content here.</p>C<hr></hr>D<h2>Next</h2>

Question 4

A<body>B  <h1>Welcome</h1>C  <p>Introduction.</p>D  <horizontal-rule>E  <h2>Details</h2>

Question 5

A<body>B  <p>Part one.</p>C  <hr>Text inside hr</hr>D  <p>Part two.</p>E</body>