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="about.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 2.True or false: a code editor stores a website’s files. (a) True (b) False
- 3.True or false: <ul> lists steps in order. (a) False (b) True
- 4.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
-
5.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2> - 6.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 7.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
-
8.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Roses are red<br>Kites fly high</p> -
9.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>The red kite</p>
<p>Rain today</p>
<h2>I love mangoes.</h2> - 10.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 12.Which of these is true of a web server? (a) has an address bar (b) colours code to help us (c) opens web pages for us (d) answers page requests
- 13.True or false: <hr> is an empty tag. (a) True (b) False
- 14.Which of these has a closing tag? (a) <img> (b) <hr> (c) <ul> (d) <meta>
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) A tiger asleep (b) tiger.jpg (c) width (d) A red kite -
16.🔍 One closing tag is missing. Which one?
<strong>The red kite</strong>
<u>Cricket is fun.</u>
<i>Rain today (a) </strong> (b) </b> (c) </i> (d) </u> - 17.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
-
18.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> (a) I love mangoes. (b) My best friend (c) My pets (d) Fun facts - 19.Which of these is true of a code editor? (a) stores a website’s files (b) shows pages from the web (c) shows line numbers (d) answers page requests
- 20.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
- 21.True or false: in <img>, width tells which image to load. (a) True (b) False
- 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 23.True or false: a web browser sends pages over the net. (a) False (b) True
- 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.True or false: <ol> is an ordered list. (a) False (b) True
- 26.True or false: <ol> lists things in any order. (a) False (b) True
-
27.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!</u>
line 2: <em>I love mangoes.</em>
line 3: <p>Rain today (a) line 3 (b) line 2 (c) line 1 -
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Planets (b) Thanks for visiting. (c) Art Gallery (d) index.html - 29.True or false: HTML on its own cannot make headings. (a) True (b) False
- 30.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
-
31.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.</b>
<h1>Fun facts</h1>
<u>Hello, world! (a) </b> (b) </em> (c) </h1> (d) </u> -
32.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
</ol> -
33.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> (a) Our school trip (b) I love mangoes. (c) Rain today -
34.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) href (b) Take the quiz (c) art.html (d) Play games - 35.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
- 36.Which of these has a closing tag? (a) <title> (b) <meta> (c) <br> (d) <input>
-
37.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) Cricket Club (d) All about me - 38.Which of these is true of a web server? (a) stores a website’s files (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) Our school bus (b) moon.png (c) width (d) The full moon - 40.True or false: HTML on its own can make a form. (a) False (b) True
Answer key
- in the same tab
- False
- False
- on the browser tab
- 2
- a web browser
- <ol>
- 4
- 3
- <h6>
- a slash /
- answers page requests
- True
- <ul>
- A tiger asleep
- </i>
- <h6>
- My pets
- shows line numbers
- to describe the image
- False
- opens it in a new tab
- False
- has a closing tag
- True
- False
- line 3
- Art Gallery
- False
- <!--
- </u>
- 4
- I love mangoes.
- Take the quiz
- <h6>
- <title>
- Cricket Club
- stores a website’s files
- The full moon
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids