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.Which of these goes in the head? (a) <p> (b) <h1> (c) <meta charset="utf-8"> (d) <table>
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> -
3.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Our school trip</p> -
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Planets (b) Mars is red. (c) Cricket Club (d) index.html - 5.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) shows pages from the web
- 6.True or false: in <img>, width tells which image to load. (a) True (b) False
-
7.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) School news (c) quiz.html (d) about.html -
8.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Hello, world!</h2>
<p>Our school trip</p> - 9.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) </body> (d) </head>
- 10.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
-
11.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> -
12.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 13.💬 Does the browser show comments on the page? (a) No (b) Yes
- 14.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
-
15.📋 What number does the browser show next to “Mango”?
<ol start="9">
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 16.Which of these is an opening tag? (a) </title> (b) </body> (c) <h1> (d) </li>
- 17.True or false: a code editor shows line numbers. (a) True (b) False
-
18.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> - 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 20.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
-
21.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) Art corner (b) href (c) School news (d) https://example.com - 22.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 23.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
-
24.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in the same tab (b) in a new tab -
25.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Cricket is fun.</h2>
<h3>My pets</h3>
<p>My pets</p>
<h3>The red kite</h3> - 26.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 27.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Art Gallery (b) body (c) Match report (d) Mars is red. - 29.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) hosts websites online
- 30.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 31.True or false: <h1> goes in the body. (a) False (b) True
- 32.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
33.🔍 One closing tag is missing. Which one?
<em>My best friend
<i>Fun facts</i>
<h1>I love mangoes.</h1> (a) </h1> (b) </i> (c) </h3> (d) </em> - 34.True or false: in <img>, alt is read by screen readers. (a) False (b) True
-
35.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 36.🏷️ HTML marks up text using ___. (a) keys (b) tags (c) pixels (d) wires
-
37.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> --> (a) My best friend (b) I love mangoes. (c) Fun facts - 38.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) colours code to help us (d) saves our .html files
- 39.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
- 40.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) High Tech (d) HyperText
Answer key
- <meta charset="utf-8">
- 150
- 2
- Cricket Club
- shows pages from the web
- False
- quiz.html
- 2
- </html>
- 1
- 1
- 2
- No
- <h1>
- 11
- <h1>
- True
- 2
- Yes
- <h1>
- Art corner
- in the head
- <h3>
- in the same tab
- 4
- an opening tag
- <li>
- Match report
- saves our .html files
- src
- True
- <ol>
- </em>
- True
- 5
- tags
- I love mangoes.
- has an address bar
- </b>
- HyperText
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids