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 address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) https://example.com (c) contact.html (d) maths.html -
2.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> - 3.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
- 4.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
-
5.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> -
6.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Rain today</p>
<p>I love mangoes.</p>
<h4>I love mangoes.</h4> - 7.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <body> (b) <html>
- 8.True or false: <li> is an ordered list. (a) True (b) False
-
9.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 10.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
-
11.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>The red kite</h2>
<p>The red kite</p> -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 13.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
14.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>My best friend</p>
<p>The red kite</p> - 15.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 16.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
-
17.🔍 One closing tag is missing. Which one?
<strong>My pets
<u>Our school trip</u>
<b>Fun facts</b> (a) </b> (b) </strong> (c) </em> (d) </u> - 18.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) stores a website’s files (d) shows pages from the web
- 19.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 20.Which of these is true of a web server? (a) saves our .html files (b) shows pages from the web (c) has an address bar (d) answers page requests
-
21.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Hello, world! (c) Our school trip - 22.True or false: <table> goes in the head. (a) False (b) True
- 23.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> - 25.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <br> (d) <hr>
- 26.True or false: <li> shows bullet points. (a) False (b) True
-
27.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Art corner (b) Maths fun (c) href (d) art.html - 28.True or false: a web browser hosts websites online. (a) False (b) True
- 29.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 30.True or false: <ol> lists things in any order. (a) True (b) False
- 31.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
- 32.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
- 33.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
-
34.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p> -
35.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>Fun facts</h3>
<h2>Rain today</h2>
<p>Our school trip</p> - 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) width (b) kite.png (c) A red kite (d) Map of India - 38.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <img>
- 39.🔍 Which is the odd one out? (a) answers page requests (b) is where we type code (c) sends pages over the net (d) stores a website’s files
- 40.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
Answer key
- contact.html
- 50
- a slash /
- a code editor
- 2
- 2
- <html>
- False
- 4
- <li>
- 2
- A tiger asleep
- No
- 4
- Yes
- the body
- </strong>
- shows pages from the web
- <ol>
- answers page requests
- Hello, world!
- False
- Markup
- 400
- <h1>
- False
- Maths fun
- False
- has a closing tag
- False
- <h2>
- <!--
- <ol>
- 2
- 3
- an empty tag
- A red kite
- <img>
- is where we type code
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids