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 text will NOT show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> (a) Hello, world! (b) Rain today (c) My pets - 2.Which of these is an empty tag? (a) <h1> (b) <input> (c) <b> (d) <ul>
-
3.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> -
4.🔍 One closing tag is missing. Which one?
<i>Rain today
<h1>The red kite</h1>
<u>My pets</u> (a) </h1> (b) </i> (c) </h2> (d) </u> - 5.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) <!DOCTYPE html> (b) </head>
- 6.Which of these is true of a web browser? (a) hosts websites online (b) answers page requests (c) is where we type code (d) turns HTML into a page
-
7.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="200"> - 8.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
- 9.🔍 Which is the odd one out? (a) opens web pages for us (b) shows line numbers (c) colours code to help us (d) is where we type code
- 10.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
-
11.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> (a) I love mangoes. (b) Hello, world! (c) Cricket is fun. -
12.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My pets</h4>
<h3>Rain today</h3>
<h3>Hello, world!</h3>
<p>Good morning!</p> -
13.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) href (c) Visit the site (d) Contact us -
14.🔍 Which line is missing its closing tag?
line 1: <small>Fun facts</small>
line 2: <b>Cricket is fun.</b>
line 3: <u>The red kite (a) line 3 (b) line 1 (c) line 2 - 15.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
-
16.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) quiz.html (b) href (c) Contact us (d) About us -
17.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 18.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </head> (c) </body> (d) </html>
-
19.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>My best friend</p> -
20.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) moon.png (b) cake.jpg (c) Birthday cake (d) dog.jpg - 21.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 22.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <\h1> (d) <h1/>
- 23.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 24.True or false: in <img>, src names the picture file. (a) True (b) False
- 25.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
- 26.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 28.💬 How does an HTML comment start? (a) <!-- (b) /* (c) # (d) //
-
29.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 30.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 31.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
32.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets - 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
- 35.True or false: <ol> lists steps in order. (a) False (b) True
- 36.True or false: <h1> goes in the body. (a) False (b) True
- 37.🔍 Which is the odd one out? (a) answers page requests (b) shows line numbers (c) sends pages over the net (d) hosts websites online
-
38.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>The red kite</p>
<p>Fun facts</p>
<p>The red kite</p>
<p>Hello, world!</p>
<h2>The red kite</h2> - 39.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 40.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
Answer key
- My pets
- <input>
- 3
- </i>
- <!DOCTYPE html>
- turns HTML into a page
- 200
- 1
- opens web pages for us
- <a>
- Hello, world!
- 4
- Contact us
- line 3
- in the body
- About us
- 250
- </html>
- 1
- cake.jpg
- <ul>
- </h1>
- an empty tag
- True
- a web browser
- a closing tag
- href
- <!--
- bullets
- an attribute
- Yes
- numbers
- No
- <h2>
- True
- True
- shows line numbers
- 5
- -->
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids