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.True or false: <ul> shows bullet points. (a) True (b) False
- 2.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
3.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<p>Good morning!</p> - 4.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
-
5.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) Our school trip (b) Fun facts (c) Hello, world! - 6.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 7.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <h1> (d) <\h1>
- 8.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 10.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
- 11.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) alt (d) height
-
12.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<!-- <p>My pets</p> --> - 13.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
-
14.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) art.html (b) quiz.html (c) Play games (d) news.html - 15.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
-
16.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!</h3>
line 2: <i>My best friend
line 3: <b>Rain today</b> (a) line 3 (b) line 1 (c) line 2 - 17.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
18.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> (a) Cricket is fun. (b) My best friend (c) Fun facts - 19.📄 Can HTML on its own make tables? (a) Yes (b) No
-
20.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>The red kite</p> (a) My best friend (b) Our school trip (c) The red kite (d) My pets -
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) Map of India (b) kite.png (c) A red kite (d) width - 22.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
-
23.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
</ol> -
24.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) quiz.html (b) Take the quiz (c) news.html (d) art.html - 25.True or false: <br> is an empty tag. (a) True (b) False
-
26.🔗 Where does this link open?
<a href="about.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 27.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
-
28.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Cricket is fun. (b) Good morning! (c) Rain today (d) Fun facts - 29.True or false: <ul> lists steps in order. (a) True (b) False
- 30.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
-
31.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!</h3>
line 2: <i>Cricket is fun.</i>
line 3: <b>I love mangoes. (a) line 3 (b) line 1 (c) line 2 - 32.Which of these is true of a web browser? (a) hosts websites online (b) answers page requests (c) opens web pages for us (d) sends pages over the net
- 33.True or false: <style> goes in the head. (a) False (b) True
-
34.📋 What number does the browser show next to “Mango”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 35.Which of these is true of a web server? (a) has an address bar (b) opens web pages for us (c) sends pages over the net (d) shows line numbers
- 36.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) colours code to help us (d) has an address bar
- 37.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing</p> - 39.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 40.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) High Tech (d) Hot Tags
Answer key
- True
- an empty tag
- 1
- <h2>
- Hello, world!
- <!DOCTYPE html>
- </h1>
- </u>
- 200
- <h6>
- alt
- 1
- <h1>
- art.html
- <ul>
- line 2
- <ul>
- My best friend
- Yes
- My best friend
- A red kite
- <a>
- 5
- art.html
- True
- in a new tab
- <ol>
- Rain today
- False
- <!--
- line 3
- opens web pages for us
- True
- 2
- sends pages over the net
- has an address bar
- <h1>
- 3
- False
- HyperText
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids