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.True or false: in <img>, height tells which image to load. (a) True (b) False
- 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
-
3.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) about.html (b) href (c) School news (d) Art corner - 4.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
-
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Riya’s Recipes (c) body (d) All about me - 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
7.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in a new tab (b) in the same tab - 8.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <ul>
-
9.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png -
10.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 11.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 12.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3> (c) <\h3> (d) <h3/>
-
13.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<p>Hello, world!
<h1>My best friend</h1> (a) </b> (b) </p> (c) </strong> (d) </h1> - 14.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
- 15.True or false: a web server has an address bar. (a) True (b) False
- 16.True or false: <li> goes inside ul or ol. (a) False (b) True
- 17.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
-
18.🔍 One closing tag is missing. Which one?
<p>Hello, world!
<em>My pets</em>
<h1>The red kite</h1> (a) </em> (b) </p> (c) </h1> (d) </h3> -
19.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) art.html (b) Visit the site (c) Contact us (d) href -
20.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>The red kite</p>
<h2>My pets</h2> - 21.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 23.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
-
24.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> - 25.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> -
27.🔍 Which line is missing its closing tag?
line 1: <em>My best friend</em>
line 2: <strong>Cricket is fun.
line 3: <i>Good morning!</i> (a) line 1 (b) line 2 (c) line 3 -
28.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) games.html (b) about.html (c) quiz.html (d) Take the quiz -
29.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in the same tab (b) in a new tab -
30.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) contact.html (b) maths.html (c) https://example.com (d) Play games - 31.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) The full moon (c) width (d) A happy dog -
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Space Facts (c) All about me (d) index.html -
34.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 35.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 36.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 37.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) has an address bar
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake - 39.📄 Can HTML on its own run a game loop? (a) No (b) Yes
-
40.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
Answer key
- False
- <img>
- Art corner
- a web browser
- All about me
- Yes
- in the same tab
- <ul>
- kite.png
- in a new tab
- in the body
- </h3>
- </p>
- <h1>
- False
- True
- <h2>
- </p>
- Contact us
- 2
- True
- an empty tag
- <li>
- 2
- <h1>
- 100
- line 2
- quiz.html
- in the same tab
- contact.html
- <ol>
- A happy dog
- Space Facts
- numbers
- No
- opens it in a new tab
- answers page requests
- Birthday cake
- No
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids