HTML elements: opening and closing tags, online

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

HTML elements: opening and closing tags in one minute

What students need to know

In this span element, 'My text' is the content sitting between the <span> opening tag and the </span> closing tag. The forward slash always comes before the tag name in a closing tag, like </p>.

The closing tag must use the same tag name as the opening tag. <h2> is closed with </h2>, not </heading>. Without a forward slash, <p> is an opening tag. To end the paragraph element you need </p> with a slash.

Mistakes students make

  • The opening h1 tag is malformed - it is missing the closing angle bracket >. It should be <h1> not <h1 title.
  • The paragraph is closed with <div> instead of </p>. The closing tag must match the opening tag and use a forward slash.
  • The paragraph is closed with <section> instead of </p>. Closing tags must match their opening tag name and include a forward slash.
  • The closing tag for div is written as <div> instead of </div>. A closing tag must have a forward slash before the tag name.

Discover other journeys with this module

What students will learn in this module

Every question in Module 3

Quick questions

  1. Which of these is a correctly formed closing tag?A</h1>B<h1/>
  2. Where does the forward slash go in a closing tag?ABefore the tag name: </p>BAfter the tag name: <p/>
  3. True or false: <div> and </p> are a correctly matched pair of tags.ATrueBFalse
  4. Which line shows a complete HTML element with opening tag, content, and closing tag?A<p>Hello<p>B<p>Hello</p>
  5. True or false: content goes between the opening and closing tag.ATrueBFalse

Key terms

Students type the meaning of:

  • </p>

Match the pairs

<p>Hello</p>Match it to what it does
</h1>Match it to what it does
Content goes between the opening and closing tagMatch it to what it does
A closing tag uses a forward slash before the tag nameMatch it to what it does
<p>Welcome<p>Match it to what it does
<h1>Title</h2>Match it to what it does

Fill in the blanks

  1. <h1>Hello World___

    Hint: Type the closing tag that matches the opening h1 tag

  2. ___<p>My paragraph</p>

    Hint: Type the opening tag for a div element

  3. <p>Some text___

    Hint: Type the closing tag that ends a paragraph element

  4. <___>Page Heading</h2>

    Hint: Type the opening tag name that matches the closing h2 tag

  5. <span>Bold text___

    Hint: Type the closing tag that ends a span element

Spot the error

Question 1

A<h1 title</h1>B  <p>Some text</p>C  <span>Label</span>

Question 2

A<div>B  <p>Hello there<div>C  <span>More</span>D</div>

Question 3

A<section>B  <h1>Title</h1>C  <p>Content<section>D</section>

Question 4

A<div>B  <span>Label</span>C  <p>More text</p>D<div>

Question 5

A<article>B  <h2>Heading</h2>C  <p>First paragraph</p>D  <p>Second paragraph</p>E<article>