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 line is missing its closing tag?
line 1: <strong>Rain today</strong>
line 2: <h1>Hello, world!
line 3: <h2>Fun facts</h2> (a) line 2 (b) line 3 (c) line 1 -
2.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing</p> - 3.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
- 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 5.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
6.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>My best friend</h3>
<p>My pets</p>
<h4>I love mangoes.</h4> - 7.True or false: a web browser shows pages from the web. (a) True (b) False
- 8.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My Hobbies (b) body (c) We won by 5 runs. (d) My drawings - 10.True or false: <ul> shows bullet points. (a) True (b) False
- 11.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
- 12.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
13.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Birds sing</p> - 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 15.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) speed (d) colours
- 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
-
17.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>The red kite</p> --> (a) Cricket is fun. (b) Good morning! (c) The red kite (d) Fun facts - 18.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
19.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Good morning!</h4>
<p>Good morning!</p> -
20.🔍 Which line is missing its closing tag?
line 1: <h2>Fun facts</h2>
line 2: <i>Hello, world!
line 3: <small>Cricket is fun.</small> (a) line 3 (b) line 1 (c) line 2 - 21.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <input>
- 22.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
- 23.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
- 24.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
-
25.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) news.html (c) Take the quiz (d) art.html - 26.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2/> (d) <h2>
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Hello, world!</p>
<p>My best friend</p>
<h2>The red kite</h2>
<p>Fun facts</p> -
28.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> --> -
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) All about me (b) index.html (c) Class 7 Blog (d) I like to read. -
30.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> - 31.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
-
32.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) href (b) Contact us (c) games.html (d) About us - 33.True or false: <table> goes in the body. (a) True (b) False
- 34.True or false: <li> is an unordered list. (a) True (b) False
-
35.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Fun facts (c) The red kite - 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
37.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <h2>Rain today</h2>
line 3: <p>My best friend (a) line 3 (b) line 2 (c) line 1 -
38.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.True or false: in <img>, height sets how tall it is. (a) True (b) False
Answer key
- line 2
- 5
- <ol>
- an opening tag
- in the head
- 3
- True
- in the body
- My drawings
- True
- <h2>
- in the head
- 5
- Yes
- structure
- opens it in a new tab
- The red kite
- False
- 2
- line 2
- <input>
- <h1>
- an attribute
- <head>
- maths.html
- </h2>
- 2
- 1
- Class 7 Blog
- 2
- text with links
- About us
- True
- False
- Fun facts
- <!DOCTYPE html>
- line 3
- numbers
- an opening tag
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids