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 words do you click on?
<a href="about.html">Take the quiz</a> (a) href (b) Take the quiz (c) Play games (d) about.html - 2.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
- 4.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 5.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) shows line numbers (d) stores a website’s files
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) moon.png (b) Our school bus (c) width (d) The full moon - 7.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
-
8.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) I love mangoes. (b) Fun facts (c) Good morning! - 9.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
-
10.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> (a) Good morning! (b) My pets (c) Fun facts -
11.🔍 One closing tag is missing. Which one?
<em>My pets</em>
<strong>Fun facts</strong>
<h1>Hello, world! (a) </em> (b) </h1> (c) </strong> (d) </i> -
12.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Birds sing<br>Stars shine</p> - 13.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
-
14.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> - 15.True or false: in <img>, src tells which image to load. (a) True (b) False
- 16.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 17.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 19.True or false: in <img>, alt names the picture file. (a) True (b) False
-
20.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<p>Good morning!</p> (a) Good morning! (b) I love mangoes. (c) Our school trip - 21.True or false: <br> is an empty tag. (a) True (b) False
- 22.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
23.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Jamun</li>
</ul> - 24.True or false: <title> has a closing tag. (a) True (b) False
- 25.Which of these is an opening tag? (a) </li> (b) <title> (c) </body> (d) </p>
-
26.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) School news (b) news.html (c) games.html (d) quiz.html - 27.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
- 28.📄 Can HTML on its own make a form? (a) Yes (b) No
-
29.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>The red kite</p> -
30.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 31.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 32.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Cricket is fun.</h4>
<h4>My best friend</h4>
<p>Hello, world!</p>
<h2>My best friend</h2> -
35.📋 What number does the browser show next to “Banana”?
<ol start="3">
<li>Mango</li>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
</ol> - 36.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
- 37.Which of these is an opening tag? (a) </p> (b) </li> (c) <p> (d) </title>
- 38.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) </head> (d) <!DOCTYPE html>
- 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 40.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
Answer key
- Take the quiz
- <h1>
- width
- False
- shows line numbers
- The full moon
- <h5>
- I love mangoes.
- <h1>
- My pets
- </h1>
- 5
- <h6>
- 3
- True
- <ul>
- an opening tag
- True
- False
- I love mangoes.
- True
- -->
- 2
- True
- <title>
- news.html
- an attribute
- Yes
- 2
- 4
- No
- <ul>
- alt
- 4
- 7
- <h1>
- <p>
- <!DOCTYPE html>
- <ol>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids