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.🔍 One closing tag is missing. Which one?
<u>I love mangoes.</u>
<small>The red kite
<i>My best friend</i> (a) </u> (b) </p> (c) </i> (d) </small> - 2.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
3.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 4.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 6.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
- 7.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
-
8.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> (a) My best friend (b) My pets (c) The red kite (d) Cricket is fun. -
9.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
10.🔗 Where does this link open?
<a href="maths.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 11.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
-
12.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>My best friend</h4>
<h3>Good morning!</h3> -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) fort.jpg (b) An old fort (c) width (d) A tiger asleep - 14.Which of these goes in the head? (a) <img> (b) <table> (c) <h1> (d) <link rel="stylesheet">
-
15.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> -
16.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> -
17.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers -
18.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<p>My pets</p>
<em>Fun facts (a) </em> (b) </p> (c) </h1> (d) </h3> - 19.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
- 20.True or false: a web browser answers page requests. (a) False (b) True
-
21.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!</strong>
line 2: <small>My best friend</small>
line 3: <i>Our school trip (a) line 3 (b) line 1 (c) line 2 - 22.True or false: HTML on its own can make a form. (a) True (b) False
-
23.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Hello, world!</p>
<h3>My pets</h3>
<p>Our school trip</p>
<h4>Fun facts</h4> - 24.Which of these is true of a web server? (a) stores a website’s files (b) opens web pages for us (c) colours code to help us (d) saves our .html files
-
25.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Hello, world!</p>
<h4>I love mangoes.</h4> - 26.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
- 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
- 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
29.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> (a) Our school trip (b) Fun facts (c) Hello, world! (d) Rain today -
30.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="300"> (a) fort.jpg (b) An old fort (c) kite.png (d) tiger.jpg - 31.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
-
32.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>The red kite</p> -
33.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) My pets (b) I love mangoes. (c) Rain today (d) Hello, world! -
34.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) fort.jpg (b) moon.png (c) bus.jpg (d) The full moon -
35.📋 What number does the browser show next to “Orange”?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 36.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <!DOCTYPE html> (c) </html> (d) <html>
-
37.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> -
38.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) contact.html (b) maths.html (c) https://example.com (d) Contact us - 39.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
-
40.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) fort.jpg (b) An old fort (c) kite.png (d) tiger.jpg
Answer key
- </small>
- href
- numbers
- <a href="about.html">
- <h4>
- </strong>
- <!DOCTYPE html>
- The red kite
- 3
- in a new tab
- to leave notes
- 3
- An old fort
- <link rel="stylesheet">
- 2
- 2
- bullets
- </em>
- <h6>
- False
- line 3
- True
- 3
- stores a website’s files
- 2
- starts a new line
- <img>
- No
- Hello, world!
- fort.jpg
- <h1>
- 2
- Hello, world!
- moon.png
- 3
- </html>
- 1
- contact.html
- -->
- fort.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids