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.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p> - 2.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
3.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) about.html (b) contact.html (c) School news (d) games.html - 4.True or false: <img> goes in the head. (a) True (b) False
-
5.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<p>I love mangoes.</p> (a) Fun facts (b) Our school trip (c) Rain today (d) I love mangoes. - 6.True or false: in <img>, src names the picture file. (a) False (b) True
- 7.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 8.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
-
9.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) contact.html (b) Visit the site (c) https://example.com (d) about.html - 10.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 11.Which of these has a closing tag? (a) <ul> (b) <img> (c) <input> (d) <hr>
-
12.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) Play games (b) about.html (c) quiz.html (d) games.html - 13.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) shows line numbers (d) colours code to help us
- 14.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
- 15.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
-
16.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>The red kite</p> (a) Good morning! (b) The red kite (c) Hello, world! (d) My pets -
17.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
</ul> - 18.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
-
19.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue</p> -
20.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> -
21.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) About us (b) https://example.com (c) art.html (d) maths.html - 22.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
-
23.📋 What number does the browser show next to “Orange”?
<ol>
<li>Grapes</li>
<li>Guava</li>
<li>Litchi</li>
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
</ol> -
24.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Fun facts</p> (a) My best friend (b) Fun facts (c) Cricket is fun. -
25.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog - 26.True or false: in <img>, alt names the picture file. (a) False (b) True
- 27.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
28.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> - 29.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
30.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>I love mangoes.</h3>
<p>My best friend</p>
<h2>I love mangoes.</h2> - 31.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
-
32.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) My pets (b) Rain today (c) Fun facts (d) Hello, world! -
33.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Fun facts</p> (a) The red kite (b) My pets (c) Fun facts - 34.True or false: <title> goes in the body. (a) True (b) False
- 35.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 36.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
37.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue</p> - 38.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a plain text editor (d) a printer
- 39.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 40.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
Answer key
- 2
- <h6>
- games.html
- False
- Rain today
- True
- an opening tag
- </body>
- about.html
- -->
- <ul>
- quiz.html
- answers page requests
- <h1>
- <h6>
- My pets
- 2
- a paragraph
- 4
- 3
- https://example.com
- <h1>
- 6
- Cricket is fun.
- dog.jpg
- False
- in the body
- 250
- in the head
- 3
- href
- Hello, world!
- My pets
- False
- <!DOCTYPE html>
- a closing tag
- 2
- a plain text editor
- to leave notes
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids