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 text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> (a) Hello, world! (b) Good morning! (c) I love mangoes. - 2.True or false: a code editor has an address bar. (a) True (b) False
-
3.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) href (b) Maths fun (c) Art corner (d) games.html - 4.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
-
5.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<h1>The red kite
<p>My pets</p> (a) </p> (b) </small> (c) </strong> (d) </h1> - 6.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
- 7.True or false: in <img>, width describes the picture. (a) True (b) False
-
8.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 9.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) turns HTML into a page (d) colours code to help us
-
10.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Maths fun (b) games.html (c) href (d) Visit the site -
11.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Hello, world!</p>
<p>Fun facts</p> - 12.True or false: <li> shows bullet points. (a) True (b) False
-
13.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Fun facts</p> (a) I love mangoes. (b) Good morning! (c) My best friend (d) Fun facts -
14.📄 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) Planets (b) Space Facts (c) index.html (d) I like to read. - 15.🔢 In a basic web page file, which comes first: “</head>” or “<body>”? (a) </head> (b) <body>
- 16.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h2>
- 18.True or false: <ol> shows bullet points. (a) True (b) False
- 19.True or false: <li> has a closing tag. (a) True (b) False
- 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 21.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.Which of these is true of a code editor? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) opens web pages for us
- 23.True or false: a code editor sends pages over the net. (a) True (b) False
- 24.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
25.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>My pets</p>
<p>I love mangoes.</p> (a) Good morning! (b) My pets (c) Cricket is fun. (d) I love mangoes. - 26.True or false: <ul> is an unordered list. (a) False (b) True
-
27.📄 What does the browser tab show for 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) index.html -
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Easy snacks (b) Art Gallery (c) I like to read. (d) index.html - 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
-
30.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
</ul> -
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Art Gallery (b) index.html (c) Mars is red. (d) Welcome! -
32.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> --> - 33.True or false: in <img>, height names the picture file. (a) False (b) True
- 34.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
- 35.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) </html> (d) <!DOCTYPE html>
-
36.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<h2>Good morning!</h2>
<p>Rain today</p>
<p>Good morning!</p> -
37.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg -
38.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<p>Cricket is fun.
<em>My pets</em> (a) </em> (b) </p> (c) </u> (d) </h2> -
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) Welcome! (d) My Hobbies - 40.True or false: <ul> is an ordered list. (a) True (b) False
Answer key
- I love mangoes.
- False
- Maths fun
- <h6>
- </h1>
- <li>
- False
- in a new tab
- turns HTML into a page
- Visit the site
- 4
- False
- Good morning!
- Space Facts
- </head>
- an empty tag
- <h1>
- False
- True
- Yes
- has a closing tag
- colours code to help us
- False
- Yes
- Cricket is fun.
- True
- My Hobbies
- Art Gallery
- <ol>
- 3
- Art Gallery
- 1
- False
- height
- <!DOCTYPE html>
- 2
- map.png
- </p>
- My Hobbies
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids