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.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
-
2.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> --> - 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
-
4.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) contact.html (c) Visit the site (d) href - 5.True or false: a web server shows line numbers. (a) False (b) True
- 6.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
- 7.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
-
8.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My pets</p>
<p>Our school trip</p> -
9.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) Contact us (b) maths.html (c) contact.html (d) https://example.com - 10.True or false: <ol> is one item of a list. (a) True (b) False
-
11.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) quiz.html (b) Contact us (c) about.html (d) games.html - 12.Which of these goes in the head? (a) <ul> (b) <h1> (c) <table> (d) <title>
- 13.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
-
14.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<h4>Fun facts</h4> -
15.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
16.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> (a) Hello, world! (b) Cricket is fun. (c) Our school trip (d) The red kite - 17.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
-
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<h2>My best friend</h2> - 19.Which of these is an opening tag? (a) </p> (b) </title> (c) <body> (d) </body>
-
20.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
21.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) href (c) contact.html (d) Play games - 22.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
- 23.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
24.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> - 25.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
- 27.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
- 28.True or false: <li> lists things in any order. (a) False (b) True
- 29.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="200"> -
31.🔍 One closing tag is missing. Which one?
<h1>Rain today
<i>My pets</i>
<small>Cricket is fun.</small> (a) </i> (b) </small> (c) </em> (d) </h1> -
32.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<h3>Rain today</h3> - 33.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
-
34.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>Fun facts</h2> - 35.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) shows line numbers (d) stores a website’s files
- 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.True or false: <br> is an empty tag. (a) True (b) False
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) My drawings (b) Riya’s Recipes (c) Mars is red. (d) index.html - 39.💬 Does the browser show comments on the page? (a) Yes (b) No
-
40.🔗 Where does this link open?
<a href="about.html">Contact us</a> (a) in the same tab (b) in a new tab
Answer key
- to describe the image
- 2
- <li>
- Visit the site
- False
- <h1>
- the body
- 1
- contact.html
- False
- quiz.html
- <title>
- a code editor
- 2
- in a new tab
- The red kite
- to leave notes
- 2
- <body>
- in a new tab
- Play games
- <h2>
- a closing tag
- 5
- Yes
- opens it in a new tab
- <li>
- False
- has a closing tag
- 200
- </h1>
- 3
- <h5>
- 2
- stores a website’s files
- has a closing tag
- True
- Riya’s Recipes
- No
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids