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: <h3>, <h2>, <h1> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
- 2.True or false: <p> has a closing tag. (a) False (b) True
- 3.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
4.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> (a) Good morning! (b) Hello, world! (c) Cricket is fun. -
5.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!
line 2: <h3>Fun facts</h3>
line 3: <u>My best friend</u> (a) line 3 (b) line 1 (c) line 2 - 6.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 7.🔍 Which is the odd one out? (a) hosts websites online (b) colours code to help us (c) is where we type code (d) shows line numbers
-
8.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>My best friend</p> --> (a) Rain today (b) Cricket is fun. (c) My best friend - 9.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
- 10.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<!-- <p>Hello, world!</p> --> - 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 13.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
-
14.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) art.html (b) news.html (c) quiz.html (d) School news - 15.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
- 16.🔍 Which is the odd one out? (a) is where we type code (b) shows pages from the web (c) has an address bar (d) opens web pages for us
- 17.Which of these is a closing tag? (a) <title> (b) </b> (c) <p> (d) <h1>
- 18.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
-
19.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Rain today</p>
<p>Good morning!</p>
<h2>My pets</h2>
<h2>Rain today</h2> -
20.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> -
21.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Our school trip</p> (a) I love mangoes. (b) My pets (c) Our school trip (d) Hello, world! - 22.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 23.True or false: HTML on its own can show paragraphs. (a) False (b) True
-
24.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> - 25.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
26.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Rivers flow<br>Kites fly high<br>Roses are red</p> - 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 28.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 29.💬 Does the browser show comments on the page? (a) Yes (b) No
-
30.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 31.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
- 32.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 33.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 34.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h1>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
- 35.🔗 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
- 36.True or false: a code editor turns HTML into a page. (a) False (b) True
-
37.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<h2>Good morning!</h2> - 38.True or false: a web browser hosts websites online. (a) True (b) False
-
39.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="400"> (a) Map of India (b) A red kite (c) kite.png (d) width
Answer key
- <h6>
- True
- in the body
- Cricket is fun.
- line 1
- <h1>
- hosts websites online
- My best friend
- <h1>
- has a closing tag
- 1
- has a closing tag
- a web server
- art.html
- alt
- is where we type code
- </b>
- True
- 3
- 2
- I love mangoes.
- on the browser tab
- True
- 1
- 1
- 5
- No
- False
- No
- numbers
- alt
- True
- an opening tag
- <h1>
- opens it in a new tab
- False
- 2
- False
- numbers
- A red kite
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids