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>, <h2>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
- 2.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) saves our .html files
- 3.True or false: <hr> is an empty tag. (a) True (b) False
-
4.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 5.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
- 6.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
- 8.True or false: <ul> goes in the head. (a) False (b) True
- 9.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) opens web pages for us (d) saves our .html files
- 10.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
-
12.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> (a) Our school trip (b) Fun facts (c) Rain today - 13.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
- 14.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) <html>
- 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
16.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
17.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 18.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
- 19.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 20.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 21.📄 Can HTML on its own make tables? (a) No (b) Yes
-
22.🔍 Which line is missing its closing tag?
line 1: <small>Our school trip</small>
line 2: <u>The red kite</u>
line 3: <b>My best friend (a) line 3 (b) line 1 (c) line 2 -
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>I love mangoes.</h2>
<p>Our school trip</p>
<h2>My pets</h2> - 24.Which of these has a closing tag? (a) <p> (b) <meta> (c) <hr> (d) <input>
-
25.📋 What number does the browser show next to “Banana”?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
</ol> -
26.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> -
27.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
29.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.
line 2: <u>I love mangoes.</u>
line 3: <small>Good morning!</small> (a) line 2 (b) line 3 (c) line 1 - 30.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
-
31.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Our school trip</h2>
<p>The red kite</p> - 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
-
34.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) My pets (b) Fun facts (c) My best friend (d) Rain today -
35.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>Hello, world!</p>
<p>Good morning!</p> (a) My pets (b) Our school trip (c) Good morning! (d) Hello, world! -
36.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> -
37.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue</p> - 38.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
- 39.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
- 40.True or false: <ol> shows bullet points. (a) False (b) True
Answer key
- <h5>
- answers page requests
- True
- bullets
- to leave notes
- <h1>
- <li>
- False
- saves our .html files
- in the body
- <a href="about.html">
- Rain today
- href
- <!DOCTYPE html>
- has a closing tag
- bullets
- 3
- Language
- Yes
- a slash /
- Yes
- line 3
- 2
- <p>
- 2
- 2
- 50
- Yes
- line 1
- <h6>
- 2
- No
- 1
- Rain today
- My pets
- 350
- 5
- <h1>
- <h6>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids