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.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 2.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
-
3.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<p>My best friend</p> -
4.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>Hello, world!</p>
<p>Fun facts</p>
<p>I love mangoes.</p> - 5.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
- 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
- 7.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 8.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 9.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
-
10.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> (a) Our school trip (b) Hello, world! (c) Good morning! -
11.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Roses are red<br>Kites fly high</p> -
12.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
13.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Kites fly high<br>Stars shine</p> - 14.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 15.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
- 16.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) structure (d) speed
-
17.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Our school trip</p> (a) My pets (b) The red kite (c) Our school trip -
18.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <b>My best friend</b>
line 3: <i>The red kite (a) line 2 (b) line 1 (c) line 3 - 19.Which of these is an opening tag? (a) </h1> (b) <title> (c) </title> (d) </li>
- 20.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
-
21.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
22.🔗 Where does this link open?
<a href="art.html">About us</a> (a) in a new tab (b) in the same tab - 23.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
- 24.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
25.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<small>My pets</small>
<strong>Hello, world! (a) </h1> (b) </small> (c) </h2> (d) </strong> - 26.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
- 27.Which of these goes in the head? (a) <a> (b) <table> (c) <meta charset="utf-8"> (d) <h1>
- 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 29.True or false: a web browser shows pages from the web. (a) False (b) True
- 30.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) has an address bar (d) opens web pages for us
- 31.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
32.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> (a) Our school trip (b) Cricket is fun. (c) My best friend (d) My pets - 33.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 34.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 35.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
-
36.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg -
37.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) about.html (b) Play games (c) About us (d) href - 38.True or false: <h1> goes in the body. (a) False (b) True
-
39.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<b>Fun facts
<small>The red kite</small> (a) </h2> (b) </small> (c) </h1> (d) </b> - 40.💬 Does the browser show comments on the page? (a) No (b) Yes
Answer key
- <h5>
- <h1>
- 3
- 4
- <!DOCTYPE html>
- to describe the image
- <ul>
- Yes
- <h6>
- Good morning!
- 4
- in a new tab
- 4
- a web server
- <h1>
- structure
- My pets
- line 3
- <title>
- opens it in a new tab
- 2
- in the same tab
- <h5>
- has a closing tag
- </strong>
- colours code to help us
- <meta charset="utf-8">
- Yes
- True
- stores a website’s files
- an opening tag
- My pets
- <h1>
- <a>
- <h1>
- dog.jpg
- Play games
- True
- </b>
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids