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>The red kite</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> (a) The red kite (b) I love mangoes. (c) Fun facts -
2.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<h2>The red kite</h2> - 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 4.Which of these is true of a web server? (a) turns HTML into a page (b) is where we type code (c) stores a website’s files (d) opens web pages for us
- 5.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
- 6.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) shows line numbers
- 7.🖼️ 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
- 8.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
-
9.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Good morning!</p>
<p>My pets</p>
<h2>Hello, world!</h2>
<p>My pets</p>
<h2>Good morning!</h2> - 10.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
- 11.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
- 13.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
- 14.True or false: <style> goes in the head. (a) False (b) True
-
15.🔍 Which line is missing its closing tag?
line 1: <small>Fun facts</small>
line 2: <p>My pets
line 3: <i>The red kite</i> (a) line 1 (b) line 3 (c) line 2 - 16.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) width (d) alt
- 17.Which of these goes in the body? (a) <img> (b) <style> (c) <meta charset="utf-8"> (d) <title>
-
18.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My pets</p> -
19.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<small>The red kite
<u>Cricket is fun.</u> (a) </h1> (b) </u> (c) </p> (d) </small> - 20.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text with links (d) text in colour
-
21.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) Art corner (b) maths.html (c) news.html (d) art.html -
22.🔍 One closing tag is missing. Which one?
<h2>My best friend
<h1>Good morning!</h1>
<h3>Our school trip</h3> (a) </h1> (b) </h2> (c) </u> (d) </h3> - 23.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 24.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
-
25.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> - 26.True or false: a code editor stores a website’s files. (a) True (b) False
- 27.True or false: HTML on its own cannot make tables. (a) False (b) True
-
28.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p> - 29.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h2>? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
- 30.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
-
31.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> (a) Cricket is fun. (b) I love mangoes. (c) My best friend (d) My pets - 32.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
- 33.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
- 34.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
35.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
36.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> - 37.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 38.True or false: <meta> has a closing tag. (a) False (b) True
- 39.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) index.html (c) Easy snacks (d) Riya’s Recipes
Answer key
- The red kite
- 2
- <li>
- stores a website’s files
- True
- shows line numbers
- to describe the image
- element
- 4
- <li>
- <ol>
- <!DOCTYPE html>
- <head>
- True
- line 2
- src
- <img>
- 1
- </small>
- text with links
- maths.html
- </h2>
- <ol>
- <h6>
- 1
- False
- False
- 1
- <h6>
- <!--
- My pets
- <h6>
- </i>
- False
- in a new tab
- 2
- <ul>
- False
- href
- Riya’s Recipes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids