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.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
- 2.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b> (d) <b/>
- 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
4.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) https://example.com (b) School news (c) maths.html (d) art.html - 5.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
- 6.📝 What does <p> make? (a) a link (b) a paragraph (c) a table (d) a picture
-
7.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Sky is blue</p> - 8.Which of these is an opening tag? (a) <p> (b) </p> (c) </b> (d) </h1>
- 9.Which of these is an opening tag? (a) </b> (b) </body> (c) <h1> (d) </p>
- 10.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
- 11.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 13.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 14.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) structure (d) sound
-
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) Riya’s Recipes (c) Mars is red. (d) body - 16.True or false: a web server is where we type code. (a) True (b) False
-
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) Here is my best one. (c) Match report (d) index.html - 18.True or false: a code editor answers page requests. (a) False (b) True
- 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
-
20.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My pets</p>
<h2>Our school trip</h2> -
21.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>Good morning!</p> - 22.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
- 23.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) map.png (c) Birthday cake (d) width -
25.🔗 Where does this link open?
<a href="news.html">About us</a> (a) in a new tab (b) in the same tab - 26.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
- 27.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
- 28.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
- 29.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
- 30.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 31.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 32.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
34.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) contact.html (c) about.html (d) Take the quiz -
35.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> - 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
- 37.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
38.📋 What number does the browser show next to “Orange”?
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 39.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <img> (d) <br>
- 40.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
Answer key
- <!DOCTYPE html>
- </b>
- Yes
- https://example.com
- text with links
- a paragraph
- 3
- <p>
- <h1>
- 1
- src
- in the head
- 6
- structure
- Match report
- False
- Riya’s Recipes
- False
- alt
- 2
- 4
- <h6>
- a web server
- Map of India
- in the same tab
- HyperText
- on the browser tab
- <h6>
- <h5>
- False
- has a closing tag
- <ol>
- No
- about.html
- 3
- <h1>
- in the body
- 2
- <h1>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids