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.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 2.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <li> (d) <p>
- 3.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
- 4.True or false: a web browser colours code to help us. (a) True (b) False
- 5.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
- 6.Which of these is an opening tag? (a) </h1> (b) <title> (c) </li> (d) </p>
- 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
8.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> - 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
- 10.True or false: <p> goes in the head. (a) False (b) True
- 11.Which of these is a closing tag? (a) <title> (b) </li> (c) <body> (d) <li>
- 12.💬 Does the browser show comments on the page? (a) Yes (b) No
- 13.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
-
14.🔍 One closing tag is missing. Which one?
<small>My best friend</small>
<i>Our school trip</i>
<h1>My pets (a) </small> (b) </p> (c) </i> (d) </h1> -
15.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 16.True or false: <ul> goes in the head. (a) False (b) True
-
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>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) Easy snacks (d) Class 7 Blog - 18.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
-
19.🔗 Where does this link open?
<a href="news.html">About us</a> (a) in the same tab (b) in a new tab -
20.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Hello, world! (c) The red kite -
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Space Facts (b) Try this poha. (c) body (d) My drawings -
22.🔍 One closing tag is missing. Which one?
<b>Hello, world!</b>
<u>My best friend
<h3>Our school trip</h3> (a) </h3> (b) </u> (c) </p> (d) </b> - 23.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
- 24.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <li> (d) <input>
-
25.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Cricket is fun.</h2>
<h4>Rain today</h4> -
26.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>I love mangoes.</h2>
<p>Hello, world!</p>
<p>Good morning!</p>
<p>My best friend</p> -
27.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> -
28.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>My pets</h2>
<p>Our school trip</p>
<h2>My pets</h2>
<p>Rain today</p>
<p>I love mangoes.</p> - 29.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
- 30.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
31.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<!-- <p>Fun facts</p> --> - 32.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
33.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Rain today</p>
<h2>My best friend</h2>
<h2>Cricket is fun.</h2> - 34.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
-
35.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> -
36.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<!-- <p>Rain today</p> --> - 37.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
- 38.True or false: <meta> is an empty tag. (a) True (b) False
- 39.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
40.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) news.html (b) quiz.html (c) games.html (d) Contact us
Answer key
- in the body
- </h1>
- <h1>
- False
- <!DOCTYPE html>
- <title>
- in the head
- 2
- <h1>
- False
- </li>
- No
- <ol>
- </h1>
- bullets
- False
- Class 7 Blog
- -->
- in the same tab
- Hello, world!
- My drawings
- </u>
- <h6>
- <input>
- 3
- 4
- 2
- 4
- <h6>
- in the head
- 2
- Yes
- 2
- alt
- 2
- 1
- <
- True
- Yes
- news.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids