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.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<strong>The red kite</strong>
<h3>Hello, world! (a) </em> (b) </strong> (c) </h3> (d) </i> - 2.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
-
3.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>My best friend</h2>
<h2>Hello, world!</h2> - 4.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
- 5.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) <body> (d) </body>
- 6.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
7.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) Easy snacks (c) Try this poha. (d) body - 8.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
- 9.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
-
10.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
11.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>I love mangoes.</p>
<p>Good morning!</p> (a) My pets (b) Our school trip (c) Good morning! (d) I love mangoes. - 12.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
- 13.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) stores a website’s files (d) is where we type code
- 14.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 15.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) turns HTML into a page (d) has an address bar
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) bus.jpg (c) width (d) An old fort -
17.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Sky is blue<br>Kites fly high</p> -
18.📋 What number does the browser show next to “Mango”?
<ol start="7">
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
<li>Litchi</li>
</ol> -
19.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> (a) Good morning! (b) Fun facts (c) My best friend - 20.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 21.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
22.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>The red kite</p> -
23.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<p>My best friend</p>
<h4>I love mangoes.</h4>
<p>Cricket is fun.</p> -
24.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 25.True or false: <li> shows bullet points. (a) True (b) False
-
26.🔍 One closing tag is missing. Which one?
<strong>Good morning!
<i>Our school trip</i>
<h2>My best friend</h2> (a) </i> (b) </u> (c) </strong> (d) </h2> -
27.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Fun facts</p> - 28.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
- 29.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .html (d) .txt
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> - 31.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 32.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 33.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
- 34.True or false: a web browser has an address bar. (a) False (b) True
- 35.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 36.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 37.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
-
38.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 39.📄 Can HTML on its own make a form? (a) Yes (b) No
-
40.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <h2>My pets
line 3: <em>Hello, world!</em> (a) line 2 (b) line 3 (c) line 1
Answer key
- </h3>
- a web server
- 3
- opens web pages for us
- </html>
- in the body
- Easy snacks
- on the browser tab
- <a>
- numbers
- Our school trip
- src
- is where we type code
- <li>
- sends pages over the net
- Our school bus
- 4
- 9
- Good morning!
- <ol>
- Yes
- 2
- 2
- bullets
- False
- </strong>
- 1
- True
- .html
- 50
- has a closing tag
- 6
- an attribute
- True
- in the head
- <!DOCTYPE html>
- <ul>
- in a new tab
- Yes
- line 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids