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 tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
- 2.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 3.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 4.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) shows line numbers
- 5.Which of these goes in the body? (a) <table> (b) <title> (c) <style> (d) <link rel="stylesheet">
- 6.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
7.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 8.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) answers page requests
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="250"> (a) An old fort (b) width (c) A tiger asleep (d) fort.jpg - 10.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
-
11.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> -
12.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 13.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) saves our .html files (d) hosts websites online
- 14.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
-
15.🔍 Which line is missing its closing tag?
line 1: <small>Rain today
line 2: <i>Our school trip</i>
line 3: <b>My pets</b> (a) line 2 (b) line 3 (c) line 1 - 16.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) index.html (c) I like to read. (d) Planets -
19.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<p>The red kite</p>
<h4>Fun facts</h4> -
20.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> -
21.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p> (a) Our school trip (b) Good morning! (c) My best friend - 22.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
- 23.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
-
24.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) art.html (c) href (d) Play games -
25.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) body (c) My Hobbies (d) I like to read. - 26.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 27.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
-
28.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue</p> -
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Easy snacks (b) body (c) Art Gallery (d) Thanks for visiting. - 30.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
31.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Good morning! (c) I love mangoes. - 32.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 33.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
- 34.True or false: <ol> lists steps in order. (a) False (b) True
- 35.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 36.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
-
37.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <p>I love mangoes.</p>
line 3: <h1>Fun facts</h1> (a) line 2 (b) line 1 (c) line 3 -
38.🔗 Where does this link open?
<a href="art.html">Maths fun</a> (a) in a new tab (b) in the same tab - 39.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
- 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
Answer key
- <h6>
- False
- <img>
- hosts websites online
- <table>
- an opening tag
- 5
- answers page requests
- An old fort
- src
- 2
- 4
- has an address bar
- <li>
- line 1
- has a closing tag
- alt
- Space Facts
- 2
- 2
- Good morning!
- <h5>
- <h6>
- Take the quiz
- Welcome!
- alt
- a web server
- 2
- Easy snacks
- <ol>
- Good morning!
- True
- an attribute
- True
- <ul>
- <ol>
- line 1
- in the same tab
- </p>
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids