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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 2.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <link rel="stylesheet">
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> -
4.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 5.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
- 6.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
-
7.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) quiz.html (b) About us (c) Play games (d) href -
8.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 9.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
-
10.🔗 Where does this link open?
<a href="maths.html">Art corner</a> (a) in the same tab (b) in a new tab - 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
-
12.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in the same tab (b) in a new tab - 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
14.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>Fun facts</h4>
<p>My pets</p>
<h2>My pets</h2>
<p>Cricket is fun.</p> -
15.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) School news (b) art.html (c) href (d) Art corner - 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
- 17.True or false: <title> goes in the body. (a) False (b) True
- 18.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 19.True or false: a web server turns HTML into a page. (a) True (b) False
-
20.🔍 One closing tag is missing. Which one?
<h3>The red kite
<b>Good morning!</b>
<small>Fun facts</small> (a) </u> (b) </small> (c) </b> (d) </h3> -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Easy snacks (b) index.html (c) My Hobbies (d) Mars is red. -
22.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> - 23.Which of these is true of a code editor? (a) has an address bar (b) colours code to help us (c) stores a website’s files (d) answers page requests
- 24.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
- 25.Which of these is true of a web server? (a) colours code to help us (b) turns HTML into a page (c) answers page requests (d) has an address bar
- 26.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) stores a website’s files (d) opens web pages for us
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>I love mangoes.</p>
<h4>Fun facts</h4> -
28.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Our school trip</p> (a) Our school trip (b) The red kite (c) Cricket is fun. (d) I love mangoes. - 29.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 30.💬 Does the browser show comments on the page? (a) Yes (b) No
- 31.True or false: <ul> lists steps in order. (a) True (b) False
- 32.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <body> (d) </head>
- 33.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 34.📝 What does <p> make? (a) a picture (b) a paragraph (c) a table (d) a link
- 35.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 36.True or false: <style> goes in the head. (a) True (b) False
- 37.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
- 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
- 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
Answer key
- <ol>
- <p>
- 400
- 250
- <h6>
- <h1>
- Play games
- bullets
- a web browser
- in the same tab
- alt
- in the same tab
- Yes
- 3
- Art corner
- opens it in a new tab
- False
- 6
- False
- </h3>
- My Hobbies
- 2
- colours code to help us
- <h1>
- answers page requests
- opens web pages for us
- 2
- Cricket is fun.
- an opening tag
- No
- False
- <!DOCTYPE html>
- to leave notes
- a paragraph
- in the body
- True
- turns HTML into a page
- an opening tag
- starts a new line
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids