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.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
- 2.Which of these is an opening tag? (a) </b> (b) <title> (c) </li> (d) </title>
- 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 4.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
-
5.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg - 7.True or false: a code editor is where we type code. (a) False (b) True
- 8.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="150"> (a) moon.png (b) width (c) Our school bus (d) The full moon -
10.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> (a) Rain today (b) Fun facts (c) The red kite (d) Cricket is fun. -
11.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
</ul> - 12.True or false: in <img>, src describes the picture. (a) True (b) False
-
13.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Good morning!</p>
<h2>Our school trip</h2>
<p>Hello, world!</p> -
14.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing</p> - 15.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 16.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 17.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 18.True or false: a code editor has an address bar. (a) True (b) False
-
19.🔗 Where does this link open?
<a href="about.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
20.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) cake.jpg (b) dog.jpg (c) Birthday cake (d) moon.png -
21.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>Fun facts</p> (a) Rain today (b) Our school trip (c) Fun facts - 22.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
- 23.Which of these is true of a code editor? (a) shows pages from the web (b) has an address bar (c) saves our .html files (d) stores a website’s files
-
24.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> - 25.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 26.Which of these is a closing tag? (a) <h1> (b) <body> (c) </b> (d) <b>
- 27.True or false: in <img>, alt tells which image to load. (a) False (b) True
- 28.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
-
29.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<h2>Cricket is fun.</h2>
<p>Cricket is fun.</p> - 30.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.True or false: <ol> lists steps in order. (a) False (b) True
- 32.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 33.True or false: a web server sends pages over the net. (a) True (b) False
-
34.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
</ul> - 35.Which of these is an empty tag? (a) <title> (b) <b> (c) <br> (d) <ul>
- 36.True or false: a code editor shows pages from the web. (a) False (b) True
-
37.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> (a) The red kite (b) My pets (c) I love mangoes. - 38.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
- 40.True or false: in <img>, width sets how wide it is. (a) False (b) True
Answer key
- True
- <title>
- No
- <ol>
- in a new tab
- Birthday cake
- True
- <h4>
- The full moon
- Cricket is fun.
- 6
- False
- 3
- 4
- in the body
- <h6>
- True
- False
- in a new tab
- cake.jpg
- Rain today
- a web server
- saves our .html files
- 2
- 1
- </b>
- False
- <h6>
- 2
- an opening tag
- True
- 6
- True
- 6
- <br>
- False
- I love mangoes.
- a closing tag
- <h5>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids