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 of these is an opening tag? (a) </body> (b) <p> (c) </h1> (d) </b>
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> - 3.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
- 4.True or false: <style> goes in the body. (a) True (b) False
- 5.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
-
6.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing<br>Rivers flow</p> - 7.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 9.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 10.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 11.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 12.True or false: a web browser saves our .html files. (a) False (b) True
-
13.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p> - 14.True or false: <li> is an ordered list. (a) False (b) True
-
15.🔍 Which line is missing its closing tag?
line 1: <em>Hello, world!</em>
line 2: <strong>My pets
line 3: <h1>I love mangoes.</h1> (a) line 3 (b) line 1 (c) line 2 - 16.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 17.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
18.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.
<em>Hello, world!</em>
<u>My best friend</u> (a) </u> (b) </strong> (c) </em> (d) </i> - 19.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h4>
- 20.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <style> (d) <img>
- 21.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
-
22.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Hello, world!</p>
<h2>My pets</h2>
<p>Our school trip</p> -
23.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Good morning!</p>
<p>My best friend</p> (a) Our school trip (b) My best friend (c) Good morning! - 24.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 25.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) </strong> (d) <\strong>
- 26.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <p> (d) <pic>
-
27.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<h2>Our school trip</h2>
<h2>The red kite</h2> - 28.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 29.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 30.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
-
31.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<p>The red kite</p> - 32.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
-
33.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) School news (b) href (c) maths.html (d) Art corner -
34.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.</h3>
<em>My best friend</em>
<small>Hello, world! (a) </strong> (b) </h3> (c) </em> (d) </small> -
35.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Papaya</li>
</ol> - 36.True or false: HTML on its own can make headings. (a) True (b) False
- 37.🔍 Which is the odd one out? (a) colours code to help us (b) shows pages from the web (c) shows line numbers (d) saves our .html files
- 38.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 39.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) </i> (d) <i/>
- 40.True or false: in <img>, src names the picture file. (a) True (b) False
Answer key
- <p>
- 50
- <li>
- False
- <ul>
- 5
- has a closing tag
- <!DOCTYPE html>
- an empty tag
- False
- on the browser tab
- False
- 2
- False
- line 2
- <a>
- an attribute
- </strong>
- <h6>
- <img>
- a code editor
- 2
- Our school trip
- 6
- </strong>
- <img>
- 1
- has a closing tag
- to leave notes
- a web browser
- 3
- <h1>
- Art corner
- </small>
- 2
- True
- shows pages from the web
- in the body
- </i>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids