HTML and CSS · lesson 2 of 30 · free

Tags and elements — HTML and CSS for kids

A tag is a word inside angle brackets, like the p tag for a paragraph. Most tags come in pairs: an opening tag and a closing tag, which has a slash after the first bracket. The opening tag, the content and the closing tag together make one element. Forgetting a closing tag is one of the most common mistakes, so learn to spot it.

▶ Watch how it works

Got it? Practise ↓

Code tip

Open, then close — “every opening tag needs its own closing tag with a slash”

  1. A tag is written in angle brackets: <p>. A closing tag adds a slash: </p>.
  2. Opening tag + content + closing tag = one element: <p>Hi</p>.
  3. To find a missing closing tag, check each opening tag has its own closing partner.

Use it for: Writing your first HTML, fixing pages that look wrong, and HTML lessons in Class 6 and 7.

Worked example: 🔍 One closing tag is missing. Which one?
<em>Fun facts
<h3>Rain today</h3>
<b>Cricket is fun.</b> → </em>

  1. <h3> is closed by </h3> and <b> by </b>.
  2. <em> is opened but never closed — </em> is missing.

Check: Every opening tag now has a partner: <em>…</em> ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 2 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 🏷️ Closing Tag Detective badge when you pass — and a certificate when you finish all 10 lessons of Part 1 · HTML Basics. You can still take the test without signing in.

🖨️ HTML Worksheet: Tags and Elements

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 HTML and CSS classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding, spreadsheets and safe internet.