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.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> (a) Fun facts (b) I love mangoes. (c) My best friend (d) Our school trip - 2.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 3.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 4.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
-
5.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<h2>Fun facts</h2>
<h2>My pets</h2>
<p>My pets</p> -
6.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) Contact us (c) about.html (d) contact.html - 7.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h1>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
- 8.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 9.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
-
10.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Hello, world!</h2>
<p>Our school trip</p> - 11.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
- 12.True or false: a web server saves our .html files. (a) True (b) False
- 13.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
- 14.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
- 15.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
-
16.🔗 Where does this link open?
<a href="art.html">Visit the site</a> (a) in the same tab (b) in a new tab - 17.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
-
18.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> -
19.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) href (b) Maths fun (c) contact.html (d) Visit the site - 20.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
-
21.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> -
22.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) Art corner (b) news.html (c) quiz.html (d) art.html - 23.Which of these is an opening tag? (a) <b> (b) </p> (c) </h1> (d) </title>
-
24.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
</ol> - 25.Which of these is a closing tag? (a) </title> (b) <li> (c) <h1> (d) <p>
- 26.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
- 27.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 28.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 29.True or false: HTML on its own can run a game loop. (a) False (b) True
-
30.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<i>My pets</i>
<h1>Our school trip</h1> (a) </p> (b) </h2> (c) </h1> (d) </i> -
31.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) href (b) Visit the site (c) Contact us (d) art.html -
32.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow<br>Stars shine</p> -
33.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!
line 2: <b>Fun facts</b>
line 3: <p>My pets</p> (a) line 2 (b) line 3 (c) line 1 -
34.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) quiz.html (b) About us (c) Play games (d) href -
35.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>My pets</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> --> -
36.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Fun facts (c) My pets (d) I love mangoes. -
37.🔍 Which line is missing its closing tag?
line 1: <h2>The red kite</h2>
line 2: <strong>Good morning!</strong>
line 3: <i>My pets (a) line 2 (b) line 3 (c) line 1 - 38.True or false: <hr> is an empty tag. (a) False (b) True
- 39.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <h1>
-
40.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) art.html
Answer key
- My best friend
- False
- in the head
- <h4>
- 2
- about.html
- <h5>
- <ul>
- 6
- 2
- element
- False
- to leave notes
- a line across the page
- </h3>
- in the same tab
- <h6>
- 2
- Visit the site
- <h1>
- 2
- art.html
- <b>
- 4
- </title>
- <
- an empty tag
- <img>
- False
- </h2>
- Contact us
- 5
- line 1
- Play games
- 3
- My best friend
- line 3
- True
- <h1>
- Visit the site
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids