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.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in a new tab (b) in the same tab - 2.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) height (d) src
- 3.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
- 4.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 5.True or false: <img> is an empty tag. (a) False (b) True
- 6.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
- 7.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p> (a) My best friend (b) I love mangoes. (c) Our school trip - 9.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) opens web pages for us
- 10.True or false: a web server stores a website’s files. (a) True (b) False
- 11.True or false: <p> is an empty tag. (a) True (b) False
- 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="150"> -
14.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
15.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Fun facts</p>
<p>My pets</p> (a) Hello, world! (b) My pets (c) Rain today (d) Fun facts - 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
-
17.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My best friend</p>
<p>I love mangoes.</p>
<h3>Hello, world!</h3>
<h4>My pets</h4> - 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
- 19.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
-
20.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Rivers flow<br>Sky is blue<br>Stars shine</p> -
21.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) games.html (b) School news (c) href (d) Art corner -
22.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
</ul> - 23.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 25.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
26.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
</ul> - 27.Which of these is an opening tag? (a) </li> (b) <p> (c) </h1> (d) </body>
- 28.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
-
29.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) href (b) Contact us (c) about.html (d) About us - 30.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
- 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
- 32.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
- 33.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
-
34.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<u>Cricket is fun.
<p>Hello, world!</p> (a) </u> (b) </h2> (c) </p> (d) </h3> -
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Riya’s Recipes (c) index.html (d) All about me - 36.Which of these is true of a web server? (a) colours code to help us (b) shows pages from the web (c) turns HTML into a page (d) stores a website’s files
- 37.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 38.True or false: <br> is an empty tag. (a) True (b) False
-
39.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> --> -
40.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
</ul>
Answer key
- in the same tab
- alt
- the body
- in the body
- True
- <h4>
- an opening tag
- Our school trip
- opens web pages for us
- True
- False
- a slash /
- 150
- in a new tab
- Hello, world!
- <a href="about.html">
- 3
- <ol>
- alt
- 5
- Art corner
- 6
- a closing tag
- Yes
- opens it in a new tab
- 2
- <p>
- 6
- About us
- <h6>
- <h1>
- a line across the page
- -->
- </u>
- Riya’s Recipes
- stores a website’s files
- Yes
- True
- 1
- 6
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids