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 number does the browser show next to “Litchi”?
<ol start="6">
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
<li>Litchi</li>
</ol> - 2.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
- 3.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 5.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
-
6.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) Art corner (c) about.html (d) quiz.html -
7.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) https://example.com (b) maths.html (c) School news (d) contact.html - 8.True or false: <title> is an empty tag. (a) True (b) False
-
9.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Stars shine<br>Birds sing</p> -
10.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> -->
<p>My pets</p>
<!-- <p>Hello, world!</p> --> -
11.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg - 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 13.True or false: in <img>, src names the picture file. (a) True (b) False
- 14.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
-
15.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Orange</li>
</ol> - 16.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
17.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) Rain today (b) Fun facts (c) My pets - 18.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) is where we type code
- 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <meta charset="utf-8"> (d) <title>
-
20.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<!-- <p>Hello, world!</p> --> - 21.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
22.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Cricket is fun.</h2>
<h4>I love mangoes.</h4>
<h2>I love mangoes.</h2> - 23.Which of these goes in the head? (a) <img> (b) <h1> (c) <meta charset="utf-8"> (d) <p>
-
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow</p> -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="150"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Class 7 Blog (b) index.html (c) Match report (d) Thanks for visiting. -
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Thanks for visiting. (c) My Hobbies (d) Easy snacks -
28.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Good morning!</h2>
<h4>Hello, world!</h4> - 29.True or false: a web browser has an address bar. (a) True (b) False
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="200"> - 31.True or false: <table> goes in the head. (a) False (b) True
- 32.Which of these goes in the head? (a) <img> (b) <h1> (c) <table> (d) <title>
- 33.Which of these is an opening tag? (a) <title> (b) </p> (c) </h1> (d) </body>
-
34.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Roses are red</p> -
35.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="400"> -
36.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> (a) My best friend (b) Hello, world! (c) The red kite - 37.True or false: in <img>, alt names the picture file. (a) True (b) False
-
38.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Welcome! (b) body (c) Art Gallery (d) We won by 5 runs. -
39.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> --> - 40.True or false: <ol> lists things in any order. (a) False (b) True
Answer key
- 9
- a code editor
- <h6>
- Yes
- <h1>
- quiz.html
- contact.html
- False
- 4
- 1
- bus.jpg
- <!DOCTYPE html>
- True
- <li>
- 2
- a web browser
- My pets
- stores a website’s files
- <p>
- 1
- False
- 4
- <meta charset="utf-8">
- 2
- An old fort
- Class 7 Blog
- My Hobbies
- 3
- True
- 200
- False
- <title>
- <title>
- 5
- 400
- The red kite
- False
- Welcome!
- 1
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids