HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
-
1.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>The red kite</h2>
<p>Cricket is fun.</p> -
2.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h4>Good morning!</h4> - 3.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
4.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My best friend</h4>
<h2>Our school trip</h2>
<h3>Rain today</h3> - 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h3> (b) <h1> (c) <h5> (d) <h6>
-
6.🔗 Where does this link open?
<a href="https://example.com" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 7.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.True or false: a web server shows line numbers. (a) False (b) True
-
9.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) games.html (b) Maths fun (c) quiz.html (d) about.html - 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
- 11.Which of these is a closing tag? (a) <b> (b) <p> (c) </body> (d) <li>
- 12.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 13.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 14.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <table> (c) <p> (d) <h1>
- 15.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
-
16.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> -
17.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p> (a) The red kite (b) My pets (c) I love mangoes. (d) My best friend - 18.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 19.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 20.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <html> (b) <body>
-
21.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 22.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
-
23.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
24.🔍 Which line is missing its closing tag?
line 1: <u>Rain today</u>
line 2: <em>The red kite
line 3: <h2>My best friend</h2> (a) line 1 (b) line 3 (c) line 2 - 25.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 26.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 27.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <p>
-
28.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) map.png (c) A red kite (d) cake.jpg - 29.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <\h1> (d) <h1/>
-
30.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 31.🔍 Which is the odd one out? (a) stores a website’s files (b) turns HTML into a page (c) opens web pages for us (d) has an address bar
- 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
33.🔍 Which line is missing its closing tag?
line 1: <em>The red kite
line 2: <h3>My pets</h3>
line 3: <p>Cricket is fun.</p> (a) line 3 (b) line 1 (c) line 2 - 34.True or false: a web browser shows pages from the web. (a) True (b) False
- 35.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 36.True or false: HTML on its own can make a form. (a) False (b) True
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 38.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) opens web pages for us
- 39.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
-
40.🔍 One closing tag is missing. Which one?
<u>Rain today
<h1>I love mangoes.</h1>
<h3>My best friend</h3> (a) </h2> (b) </h1> (c) </h3> (d) </u>
Answer key
- 2
- 2
- No
- 4
- <h6>
- in a new tab
- an empty tag
- False
- quiz.html
- <li>
- </body>
- to leave notes
- <a href="about.html">
- <link rel="stylesheet">
- element
- 2
- My best friend
- an empty tag
- <h6>
- <html>
- in a new tab
- href
- 4
- line 2
- <a>
- True
- <p>
- kite.png
- </h1>
- 2
- stores a website’s files
- Yes
- line 1
- True
- <ul>
- True
- <h4>
- shows line numbers
- <!DOCTYPE html>
- </u>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids