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.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 2.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
- 3.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 4.📄 Can HTML on its own make headings? (a) No (b) Yes
-
5.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<p>Good morning!</p> - 6.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
- 7.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 8.Which of these is an opening tag? (a) <li> (b) </li> (c) </body> (d) </h1>
- 9.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
-
10.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> --> - 11.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em/> (c) <\em> (d) <em>
- 12.Which of these is a closing tag? (a) <li> (b) <h1> (c) </p> (d) <b>
- 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
14.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) games.html (b) quiz.html (c) Contact us (d) about.html -
15.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today
line 2: <strong>Fun facts</strong>
line 3: <u>The red kite</u> (a) line 3 (b) line 2 (c) line 1 -
16.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>My pets</p>
<!-- <p>I love mangoes.</p> --> - 17.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 18.Which of these is true of a web browser? (a) colours code to help us (b) saves our .html files (c) sends pages over the net (d) turns HTML into a page
-
19.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) https://example.com (b) maths.html (c) contact.html (d) About us - 20.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 21.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
- 22.Which of these is an opening tag? (a) </body> (b) <title> (c) </li> (d) </h1>
-
23.🔍 One closing tag is missing. Which one?
<i>Our school trip</i>
<h1>My pets
<em>The red kite</em> (a) </h1> (b) </i> (c) </b> (d) </em> -
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Art Gallery (c) Thanks for visiting. (d) All about me -
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) cake.jpg (b) A red kite (c) kite.png (d) map.png -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Art Gallery (c) Try this poha. (d) Welcome! - 27.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
-
28.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p> -
29.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>The red kite</p>
<p>Hello, world!</p> - 30.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
- 31.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
- 32.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 33.Which of these is an empty tag? (a) <ul> (b) <p> (c) <h1> (d) <img>
-
34.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png - 35.True or false: HTML on its own cannot keep a high score. (a) False (b) True
-
36.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>Cricket is fun.</h3>
<p>My best friend</p> - 37.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) has an address bar (d) opens web pages for us
- 39.True or false: <h1> has a closing tag. (a) False (b) True
-
40.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.
<h3>Hello, world!</h3>
<p>My pets</p> (a) </strong> (b) </p> (c) </h3> (d) </h1>
Answer key
- bullets
- <!DOCTYPE html>
- an empty tag
- Yes
- 2
- to leave notes
- in the head
- <li>
- <
- 2
- </em>
- </p>
- in the body
- quiz.html
- line 1
- 2
- a web server
- turns HTML into a page
- contact.html
- <a>
- href
- <title>
- </h1>
- Art Gallery
- kite.png
- Art Gallery
- <li>
- 1
- 4
- <h1>
- alt
- True
- <img>
- cake.jpg
- True
- 2
- an opening tag
- is where we type code
- True
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids