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.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) Here is my best one. (c) Art Gallery (d) body - 2.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
-
3.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Hello, world!</p>
<p>My best friend</p> - 4.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
-
5.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> - 6.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 7.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) keys (d) tags
-
8.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 9.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
-
10.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> (a) Cricket is fun. (b) My pets (c) I love mangoes. (d) Fun facts - 11.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h6>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="350"> - 13.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 14.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 15.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
-
16.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
17.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> -
18.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Sky is blue</p> -
19.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> (a) Our school trip (b) The red kite (c) Cricket is fun. - 20.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
- 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
- 22.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
-
24.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) My pets (b) I love mangoes. (c) Cricket is fun. (d) My best friend - 25.True or false: a web server turns HTML into a page. (a) False (b) True
-
26.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun - 27.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
28.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in a new tab (b) in the same tab -
29.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
</ul> - 30.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) shows pages from the web (d) colours code to help us
- 31.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
-
32.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
33.📄 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>We won by 5 runs.</p>
</body>
</html> (a) body (b) My drawings (c) We won by 5 runs. (d) Class 7 Blog - 34.True or false: <ul> is an empty tag. (a) True (b) False
- 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 36.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog -
38.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab - 39.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
-
40.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab
Answer key
- Easy snacks
- 6
- 3
- on the browser tab
- 2
- <!--
- tags
- 3
- <ul>
- Fun facts
- <h2>
- 350
- has a closing tag
- <!DOCTYPE html>
- the body
- 6
- 100
- 3
- The red kite
- to leave notes
- <h6>
- a closing tag
- <h2>
- My best friend
- False
- contact.html
- Yes
- in the same tab
- 6
- colours code to help us
- a code editor
- 6
- My drawings
- False
- <a>
- No
- A happy dog
- in the same tab
- -->
- in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids