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 heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
- 2.🔍 Which is the odd one out? (a) turns HTML into a page (b) answers page requests (c) sends pages over the net (d) hosts websites online
- 3.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
- 4.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
- 5.Which of these is a closing tag? (a) <b> (b) <body> (c) <title> (d) </body>
- 6.Which of these has a closing tag? (a) <br> (b) <p> (c) <img> (d) <hr>
-
7.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p> (a) Our school trip (b) The red kite (c) Rain today - 8.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) </html> (d) <head>
- 9.Which of these has a closing tag? (a) <title> (b) <br> (c) <meta> (d) <hr>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 11.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
-
12.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="200"> (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg -
13.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<h2>My pets</h2>
<p>My pets</p> - 14.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 15.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 16.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 17.True or false: a web server is where we type code. (a) True (b) False
- 18.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
-
19.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>My pets</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) My pets (c) Rain today (d) The red kite - 20.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 21.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
- 22.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) adds a picture (d) makes a list
- 23.Which of these goes in the body? (a) <a> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 25.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
26.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My pets</p>
<p>My best friend</p>
<p>Hello, world!</p> - 27.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
28.📋 What number does the browser show next to “Mango”?
<ol start="2">
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 29.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h4>
-
31.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Our school trip</p>
<p>The red kite</p>
<h3>Hello, world!</h3> - 32.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
-
33.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> - 34.Which of these is an empty tag? (a) <b> (b) <hr> (c) <title> (d) <h1>
- 35.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h5>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
-
37.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) news.html (b) quiz.html (c) art.html (d) School news - 38.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 39.Which of these is an opening tag? (a) </p> (b) </title> (c) <h1> (d) </h1>
-
40.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers
Answer key
- <h6>
- turns HTML into a page
- <!--
- <li>
- </body>
- <p>
- Rain today
- <!DOCTYPE html>
- <title>
- 50
- <h1>
- fort.jpg
- 2
- in the body
- 1
- a slash /
- False
- <h5>
- Rain today
- a code editor
- 6
- starts a new line
- <a>
- has a closing tag
- opens it in a new tab
- 4
- an empty tag
- 5
- a closing tag
- <h5>
- 2
- href
- 1
- <hr>
- text with links
- <h5>
- art.html
- <ul>
- <h1>
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids