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.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 2.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <\h3> (c) <h3/> (d) <h3>
- 3.True or false: a web browser opens web pages for us. (a) True (b) False
-
4.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> --> - 5.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 6.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) is where we type code (d) opens web pages for us
- 8.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
9.🔍 One closing tag is missing. Which one?
<h3>My pets
<h2>I love mangoes.</h2>
<i>Hello, world!</i> (a) </h3> (b) </h2> (c) </i> (d) </p> - 10.True or false: in <img>, src names the picture file. (a) False (b) True
-
11.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) Contact us (b) contact.html (c) https://example.com (d) about.html -
12.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
</ol> -
13.🔍 Which line is missing its closing tag?
line 1: <small>Our school trip</small>
line 2: <b>Cricket is fun.
line 3: <h3>My pets</h3> (a) line 2 (b) line 1 (c) line 3 -
14.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) games.html (c) quiz.html (d) news.html - 15.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
- 16.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue<br>Roses are red</p> - 18.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
- 19.Which of these is an opening tag? (a) <body> (b) </body> (c) </p> (d) </li>
-
20.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon - 21.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
- 24.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
-
25.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) Good morning! (c) Rain today -
26.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) https://example.com (b) contact.html (c) maths.html (d) School news - 27.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
-
28.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<p>Rain today</p>
<p>My pets</p> -
29.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Rain today</h3>
<h2>Our school trip</h2> - 30.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
- 31.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
- 32.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) hosts websites online (d) stores a website’s files
-
33.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<!-- <p>My best friend</p> --> (a) I love mangoes. (b) My best friend (c) Cricket is fun. (d) My pets - 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> -
36.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> - 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
38.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>Fun facts</p> - 39.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 40.True or false: <h1> goes in the head. (a) False (b) True
Answer key
- Yes
- </h3>
- True
- 1
- opens it in a new tab
- a closing tag
- opens web pages for us
- <ul>
- </h3>
- True
- about.html
- 2
- line 2
- news.html
- to describe the image
- a closing tag
- 4
- as one space
- <body>
- moon.png
- in the head
- No
- 1
- alt
- Rain today
- contact.html
- <h2>
- 3
- 3
- <h1>
- <
- shows line numbers
- My best friend
- src
- 50
- 2
- an empty tag
- 3
- in the head
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids