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.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 3.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 4.True or false: <img> has a closing tag. (a) True (b) False
-
5.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Birds sing<br>Stars shine</p> - 6.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
- 7.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
-
8.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Cricket is fun.</h4>
<p>Our school trip</p> - 9.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
-
10.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> -
11.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p> (a) Cricket is fun. (b) I love mangoes. (c) Good morning! - 12.True or false: <ol> is an unordered list. (a) False (b) True
- 13.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Kites fly high</p> -
15.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>Rain today</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Hello, world! (c) Rain today (d) Fun facts - 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Class 7 Blog (b) Easy snacks (c) Thanks for visiting. (d) index.html - 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.Which of these is a closing tag? (a) <p> (b) <title> (c) </body> (d) <li>
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) My drawings (b) Class 7 Blog (c) Mars is red. (d) body - 21.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> - 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
24.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> -
25.🔗 Where does this link open?
<a href="news.html">Play games</a> (a) in the same tab (b) in a new tab -
26.🔍 Which line is missing its closing tag?
line 1: <u>My pets</u>
line 2: <small>The red kite</small>
line 3: <strong>Our school trip (a) line 3 (b) line 2 (c) line 1 -
27.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) https://example.com (b) contact.html (c) about.html (d) Visit the site -
28.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) Art corner (b) about.html (c) School news (d) href - 29.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 30.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
- 31.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
- 32.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
- 33.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h2>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
- 34.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <br> (d) <ul>
-
35.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets - 36.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
-
37.🔍 One closing tag is missing. Which one?
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<b>My best friend (a) </b> (b) </h2> (c) </p> (d) </h1> - 38.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
-
39.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>The red kite</p> - 40.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
Answer key
- bullets
- Yes
- in the head
- False
- 4
- 6
- on the browser tab
- 2
- <ul>
- 2
- Cricket is fun.
- False
- </strong>
- 3
- Fun facts
- opens it in a new tab
- Class 7 Blog
- an opening tag
- </body>
- My drawings
- <ol>
- 400
- in the head
- 2
- in the same tab
- line 3
- about.html
- Art corner
- has a closing tag
- <h6>
- an attribute
- to leave notes
- <h2>
- <ol>
- numbers
- a slash /
- </b>
- <h6>
- 2
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids