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.🔗 Where does this link open?
<a href="news.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 2.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
3.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>My pets</p> -->
<p>Our school trip</p> - 4.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
5.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>My pets</p> - 6.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) stores a website’s files (d) saves our .html files
- 7.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 8.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
- 9.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 10.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 11.Which of these is true of a web browser? (a) hosts websites online (b) has an address bar (c) is where we type code (d) sends pages over the net
-
12.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<h1>My pets
<u>Rain today</u> (a) </h2> (b) </h3> (c) </u> (d) </h1> - 13.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 14.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 15.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
-
16.📋 What number does the browser show next to “Mango”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Guava</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
</ol> -
17.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> - 18.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <img> (d) <style>
- 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 20.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
- 21.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
- 22.True or false: <ul> is one item of a list. (a) True (b) False
-
23.📋 What number does the browser show next to “Mango”?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
</ol> -
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) index.html (c) Easy snacks (d) Art Gallery - 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
- 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 28.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 29.Which of these goes in the head? (a) <h1> (b) <p> (c) <link rel="stylesheet"> (d) <a>
- 30.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
-
31.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>I love mangoes.</h2>
<p>My pets</p>
<p>Our school trip</p>
<p>I love mangoes.</p> - 32.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
- 33.True or false: a web server is where we type code. (a) False (b) True
-
34.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> (a) Cricket is fun. (b) I love mangoes. (c) My best friend - 35.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 36.Which of these goes in the body? (a) <a> (b) <style> (c) <title> (d) <link rel="stylesheet">
-
37.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>I love mangoes.</h2>
<h2>The red kite</h2>
<h2>Hello, world!</h2> -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) width (b) Map of India (c) map.png (d) Birthday cake - 39.True or false: HTML on its own cannot make headings. (a) True (b) False
- 40.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- in a new tab
- False
- 1
- an opening tag
- 2
- stores a website’s files
- Yes
- on the browser tab
- False
- <h3>
- has an address bar
- </h1>
- <ul>
- <h1>
- alt
- 5
- 4
- <img>
- <ul>
- src
- width
- False
- 5
- Art Gallery
- No
- <h2>
- a slash /
- 6
- <link rel="stylesheet">
- a web browser
- 4
- to leave notes
- False
- Cricket is fun.
- <h6>
- <a>
- 1
- Map of India
- False
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids