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 address opens when you click this link?
<a href="games.html">School news</a> (a) School news (b) contact.html (c) games.html (d) about.html -
2.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!
line 2: <b>My pets</b>
line 3: <p>Cricket is fun.</p> (a) line 2 (b) line 3 (c) line 1 - 3.Which of these is true of a code editor? (a) has an address bar (b) is where we type code (c) opens web pages for us (d) sends pages over the net
- 4.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) alt (d) width
- 5.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
6.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> - 7.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
- 8.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
- 9.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
-
10.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) about.html (b) quiz.html (c) Visit the site (d) games.html -
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Space Facts (c) Thanks for visiting. (d) All about me -
12.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Kites fly high<br>Roses are red<br>Rivers flow</p> - 13.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
- 14.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) opens web pages for us
-
15.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<!-- <p>The red kite</p> --> -
16.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) href (b) contact.html (c) About us (d) Play games -
17.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<h4>Cricket is fun.</h4>
<p>Our school trip</p> -
18.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) Play games (b) About us (c) href (d) quiz.html - 19.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
- 20.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
-
21.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) maths.html (b) Visit the site (c) href (d) Maths fun - 22.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
-
23.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p> - 24.🔢 In a basic web page file, which comes first: “<head>” or “</html>”? (a) </html> (b) <head>
-
25.📋 What number does the browser show next to “Mango”?
<ol start="7">
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 26.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
-
27.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) Contact us (b) About us (c) maths.html (d) href -
28.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Stars shine</p> - 29.Which of these is a closing tag? (a) <h1> (b) <li> (c) <b> (d) </p>
- 30.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <table> (d) <meta charset="utf-8">
- 31.Which of these goes in the body? (a) <style> (b) <title> (c) <img> (d) <meta charset="utf-8">
- 32.💬 Does the browser show comments on the page? (a) Yes (b) No
-
33.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) maths.html (b) Maths fun (c) href (d) Art corner - 34.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 35.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
- 36.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
37.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) Contact us (b) about.html (c) href (d) About us - 38.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
40.🔍 One closing tag is missing. Which one?
<strong>Rain today</strong>
<b>The red kite
<p>Fun facts</p> (a) </strong> (b) </small> (c) </b> (d) </p>
Answer key
- games.html
- line 1
- is where we type code
- alt
- <ul>
- 2
- <h1>
- <!DOCTYPE html>
- starts a new line
- quiz.html
- All about me
- 5
- <html>
- opens web pages for us
- 2
- Play games
- 3
- Play games
- src
- -->
- Visit the site
- <h1>
- 1
- <head>
- 8
- <!--
- About us
- 5
- </p>
- <table>
- <img>
- No
- Maths fun
- <h6>
- on the browser tab
- Yes
- About us
- a paragraph
- 50
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids