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 of these has a closing tag? (a) <p> (b) <br> (c) <meta> (d) <input>
-
2.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> - 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 4.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 5.True or false: <ul> is one item of a list. (a) True (b) False
- 6.Which of these goes in the body? (a) <ul> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <style>
-
7.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg -
8.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Sky is blue<br>Kites fly high</p> -
9.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>My pets</p>
<p>My best friend</p>
<p>I love mangoes.</p> - 10.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
- 11.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.Which of these has a closing tag? (a) <br> (b) <hr> (c) <img> (d) <h1>
- 13.True or false: <hr> has a closing tag. (a) False (b) True
-
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) I like to read. (c) All about me (d) body - 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
-
16.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Fun facts</p>
<h2>Cricket is fun.</h2> -
17.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>My best friend</p>
<p>My pets</p> (a) Good morning! (b) My pets (c) The red kite (d) My best friend - 18.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </b>
- 19.True or false: HTML on its own cannot pick a random number. (a) False (b) True
-
20.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Hello, world! (c) Our school trip (d) Rain today - 21.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
-
22.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<h4>Rain today</h4>
<p>The red kite</p>
<h3>Cricket is fun.</h3> - 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
- 24.True or false: in <img>, src shows if the image fails. (a) False (b) True
- 25.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
- 26.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
- 27.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
- 28.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 29.True or false: <ul> shows bullet points. (a) False (b) True
-
30.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> --> -
31.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Birds sing<br>Sky is blue<br>Stars shine</p> - 32.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) <\em> (d) </em>
-
33.🔍 One closing tag is missing. Which one?
<small>Fun facts</small>
<h3>Good morning!
<strong>The red kite</strong> (a) </p> (b) </h3> (c) </strong> (d) </small> - 34.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) width (b) Our school bus (c) bus.jpg (d) An old fort - 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
- 37.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
- 38.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 39.Which of these is true of a web browser? (a) hosts websites online (b) shows pages from the web (c) colours code to help us (d) is where we type code
-
40.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p> (a) Cricket is fun. (b) Hello, world! (c) I love mangoes.
Answer key
- <p>
- 2
- <li>
- Yes
- False
- <ul>
- bus.jpg
- 4
- 4
- to describe the image
- an empty tag
- <h1>
- False
- All about me
- a slash /
- 2
- The red kite
- </b>
- True
- Rain today
- <h1>
- 3
- as one space
- False
- <h1>
- <h2>
- <!DOCTYPE html>
- has a closing tag
- True
- 2
- 5
- </em>
- </h3>
- <!DOCTYPE html>
- Our school bus
- <h6>
- <h6>
- No
- shows pages from the web
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids