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>Fun facts</p> -->
<p>Our school trip</p>
<p>My best friend</p> (a) Our school trip (b) Fun facts (c) My best friend - 2.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) </html>
-
3.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) kite.png (b) fort.jpg (c) tiger.jpg (d) An old fort -
4.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 5.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
-
6.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 7.Which of these is true of a code editor? (a) has an address bar (b) hosts websites online (c) turns HTML into a page (d) colours code to help us
- 8.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
- 9.Which of these is a closing tag? (a) <h1> (b) <title> (c) <p> (d) </body>
- 10.True or false: <h1> is an empty tag. (a) True (b) False
-
11.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) dog.jpg (b) map.png (c) cake.jpg (d) Map of India - 12.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
- 13.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) keys (d) tags
-
14.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers -
15.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> --> (a) Our school trip (b) The red kite (c) I love mangoes. - 16.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
-
17.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) map.png (c) cake.jpg (d) A red kite - 18.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
- 19.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
- 20.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <u> (c) </u> (d) <\u>
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg - 22.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 23.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
- 24.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
- 25.True or false: HTML on its own can make a form. (a) True (b) False
- 26.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) is where we type code
- 27.Which of these has a closing tag? (a) <title> (b) <meta> (c) <img> (d) <hr>
-
28.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg -
29.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) Fun facts (b) Good morning! (c) Hello, world! (d) My pets - 30.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
- 31.True or false: a web server hosts websites online. (a) True (b) False
- 32.Which of these is a closing tag? (a) </p> (b) <h1> (c) <p> (d) <li>
- 33.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
- 34.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
-
35.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) href (b) School news (c) Art corner (d) contact.html - 36.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
- 37.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 38.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
- 39.True or false: in <img>, src tells which image to load. (a) True (b) False
- 40.True or false: <h1> goes in the body. (a) True (b) False
Answer key
- Fun facts
- </html>
- fort.jpg
- 150
- width
- 1
- colours code to help us
- href
- </body>
- False
- map.png
- -->
- tags
- bullets
- The red kite
- <!DOCTYPE html>
- kite.png
- an attribute
- a web browser
- </u>
- Birthday cake
- Yes
- <h2>
- <h1>
- True
- is where we type code
- <title>
- map.png
- Hello, world!
- <!DOCTYPE html>
- True
- </p>
- </body>
- alt
- Art corner
- a web browser
- True
- <h6>
- True
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids