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 text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> --> (a) My pets (b) Good morning! (c) Rain today -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon - 3.Which of these is a closing tag? (a) <li> (b) <b> (c) <body> (d) </h1>
- 4.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
- 5.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) </html>
- 7.Which of these goes in the head? (a) <a> (b) <style> (c) <img> (d) <table>
- 8.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
-
9.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <em>Our school trip
line 3: <p>My best friend</p> (a) line 1 (b) line 2 (c) line 3 - 10.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <h3> (d) <\h3>
- 11.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
- 12.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 13.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.🖼️ Which attribute of <img> names the picture file? (a) src (b) alt (c) width (d) height
- 15.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) answers page requests (d) shows pages from the web
-
16.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Cricket is fun. (c) Fun facts -
17.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) Maths fun (b) games.html (c) contact.html (d) about.html - 18.True or false: a code editor saves our .html files. (a) True (b) False
- 19.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 20.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
- 21.True or false: a code editor answers page requests. (a) False (b) True
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
-
23.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My best friend</p>
<p>My best friend</p>
<p>Our school trip</p> - 24.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 25.True or false: HTML on its own can pick a random number. (a) False (b) True
- 26.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
- 27.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
- 28.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
- 29.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 30.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 31.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
-
32.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Roses are red<br>Kites fly high</p> - 33.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
-
34.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) dog.jpg (b) cake.jpg (c) map.png (d) Map of India -
35.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Our school trip</h3>
<p>Rain today</p> - 36.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
- 37.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <title>
- 38.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
-
39.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> (a) Rain today (b) Hello, world! (c) Good morning! - 40.Which of these goes in the body? (a) <a> (b) <meta charset="utf-8"> (c) <title> (d) <link rel="stylesheet">
Answer key
- Good morning!
- A happy dog
- </h1>
- <h4>
- a closing tag
- </html>
- <style>
- True
- line 2
- </h3>
- </u>
- <ul>
- a closing tag
- src
- answers page requests
- My best friend
- games.html
- True
- a web server
- <h6>
- False
- <h1>
- 1
- Yes
- False
- </h2>
- tags
- <h2>
- has a closing tag
- -->
- <h1>
- 4
- <li>
- map.png
- 2
- a slash /
- <title>
- </h1>
- Hello, world!
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids