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 BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 3.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
-
4.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>My pets</h2>
<p>The red kite</p> - 5.True or false: <hr> has a closing tag. (a) False (b) True
- 6.True or false: in <img>, alt describes the picture. (a) True (b) False
- 7.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
8.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
9.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<h3>Our school trip
<h1>My pets</h1> (a) </h1> (b) </h2> (c) </b> (d) </h3> - 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
- 11.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
-
12.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>My best friend</h4>
<p>Our school trip</p>
<h3>Fun facts</h3> - 13.Which of these is an opening tag? (a) </body> (b) </h1> (c) </title> (d) <li>
- 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
15.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) quiz.html (b) art.html (c) news.html (d) Play games -
16.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> - 17.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
- 18.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
19.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) href (d) about.html -
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>My pets</h3>
<p>My pets</p> -
21.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
22.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<p>Our school trip</p> (a) Our school trip (b) The red kite (c) My best friend - 23.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 24.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
25.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg - 26.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
- 27.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 28.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
-
29.🔗 Where does this link open?
<a href="quiz.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
30.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 31.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
32.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 33.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
- 34.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 35.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
- 36.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
- 37.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
38.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in a new tab (b) in the same tab - 39.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
-
40.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus
Answer key
- <h1>
- Yes
- <h3>
- 2
- False
- True
- in the body
- in the same tab
- </h3>
- as one space
- a line across the page
- 3
- <li>
- <ol>
- art.html
- 2
- src
- False
- Visit the site
- 2
- in a new tab
- My best friend
- <h5>
- in the body
- bus.jpg
- <!DOCTYPE html>
- an empty tag
- <a>
- in a new tab
- 6
- has a closing tag
- 4
- <!DOCTYPE html>
- False
- a code editor
- <h3>
- a closing tag
- in the same tab
- <h1>
- bus.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids