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>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) Easy snacks (d) I like to read. - 2.Which of these goes in the head? (a) <p> (b) <a> (c) <title> (d) <ul>
- 3.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
-
4.📄 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>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Match report (c) index.html (d) Riya’s Recipes - 5.True or false: <b> has a closing tag. (a) True (b) False
- 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h4> (d) <h6>
- 7.Which of these is true of a web server? (a) is where we type code (b) colours code to help us (c) sends pages over the net (d) shows pages from the web
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> -
9.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.</b>
<u>Good morning!
<h1>The red kite</h1> (a) </em> (b) </b> (c) </h1> (d) </u> - 10.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 11.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 12.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 13.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
- 14.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h4>
-
15.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html -
16.🖼️ 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 - 17.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 19.True or false: in <img>, alt describes the picture. (a) False (b) True
-
20.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>My pets</p> (a) I love mangoes. (b) My pets (c) Cricket is fun. (d) Our school trip -
21.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Hello, world!</p>
<p>My pets</p> (a) My pets (b) Hello, world! (c) My best friend (d) The red kite -
22.🔍 One closing tag is missing. Which one?
<b>Rain today</b>
<strong>My pets
<em>Our school trip</em> (a) </b> (b) </em> (c) </u> (d) </strong> -
23.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> - 24.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.📄 Can HTML on its own make headings? (a) No (b) Yes
- 26.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) answers page requests (d) saves our .html files
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<p>Our school trip</p> - 28.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 29.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
-
30.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Rivers flow<br>Roses are red</p> - 31.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <h1/> (d) <\h1>
-
32.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Hello, world! (c) Cricket is fun. -
33.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Grapes</li>
</ol> -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) width (b) Birthday cake (c) Map of India (d) map.png - 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
36.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) maths.html (c) About us (d) href - 37.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
- 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
39.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> --> - 40.Which of these goes in the body? (a) <title> (b) <style> (c) <ul> (d) <link rel="stylesheet">
Answer key
- Easy snacks
- <title>
- <h6>
- Riya’s Recipes
- True
- <h1>
- sends pages over the net
- 200
- </u>
- in the body
- a code editor
- -->
- <a>
- <h1>
- contact.html
- bus.jpg
- in the body
- 1
- True
- Cricket is fun.
- The red kite
- </strong>
- 1
- an empty tag
- Yes
- opens web pages for us
- 1
- an opening tag
- False
- 4
- </h1>
- Rain today
- 2
- Map of India
- Yes
- Play games
- <a href="about.html">
- href
- 2
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids