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.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
- 2.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
3.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) href (c) Play games (d) art.html -
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) All about me (b) body (c) Class 7 Blog (d) Thanks for visiting. - 5.True or false: a code editor has an address bar. (a) True (b) False
- 6.True or false: <table> goes in the head. (a) True (b) False
-
7.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<p>My best friend</p> - 8.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) is where we type code (d) opens web pages for us
- 9.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
10.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Rain today (c) I love mangoes. - 11.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
- 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) </head> (d) <!DOCTYPE html>
- 13.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
-
14.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>My pets</h2>
<h2>The red kite</h2>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> -
15.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) art.html (b) news.html (c) maths.html (d) About us - 16.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 17.True or false: a web browser has an address bar. (a) False (b) True
- 18.True or false: <li> is an unordered list. (a) True (b) False
-
19.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 20.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
- 21.True or false: <p> is an empty tag. (a) True (b) False
- 22.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 23.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
-
24.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) Good morning! (c) Rain today -
25.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing<br>Rivers flow</p> -
26.🔍 One closing tag is missing. Which one?
<h2>My pets
<b>Fun facts</b>
<h3>The red kite</h3> (a) </p> (b) </h3> (c) </b> (d) </h2> - 27.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
28.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>I love mangoes.</h2>
<p>Our school trip</p> - 29.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 30.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> - 32.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
-
33.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<p>Rain today</p> - 34.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) <!DOCTYPE html> (b) </head>
- 35.💬 Does the browser show comments on the page? (a) No (b) Yes
- 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
37.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.</b>
line 2: <em>Good morning!
line 3: <h1>The red kite</h1> (a) line 1 (b) line 2 (c) line 3 -
38.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> - 39.Which of these has a closing tag? (a) <input> (b) <li> (c) <br> (d) <meta>
-
40.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in the same tab (b) in a new tab
Answer key
- 1
- No
- Take the quiz
- All about me
- False
- False
- 1
- is where we type code
- in the body
- Fun facts
- width
- <!DOCTYPE html>
- <img>
- 3
- maths.html
- <h6>
- True
- False
- in a new tab
- element
- False
- a web browser
- <h1>
- I love mangoes.
- 5
- </h2>
- in the body
- 2
- in the head
- a closing tag
- 3
- <!--
- 1
- <!DOCTYPE html>
- No
- 6
- line 2
- 2
- <li>
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids