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.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 2.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
-
3.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) All about me (c) Cricket Club (d) index.html - 4.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
- 5.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
-
6.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) about.html (b) contact.html (c) https://example.com (d) Play games - 7.True or false: a web server answers page requests. (a) True (b) False
-
8.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p> (a) Fun facts (b) Rain today (c) Our school trip (d) Good morning! - 9.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 10.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
- 11.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
- 12.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 13.True or false: a web browser answers page requests. (a) True (b) False
-
14.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Our school trip</p>
<p>Good morning!</p>
<p>Good morning!</p>
<p>I love mangoes.</p> -
15.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) About us (b) contact.html (c) href (d) Contact us - 16.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 19.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <ul> (d) <table>
-
20.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) games.html (b) School news (c) contact.html (d) about.html - 21.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 22.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) is where we type code (d) colours code to help us
- 23.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) hosts websites online
- 24.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
- 26.Which of these is an empty tag? (a) <ul> (b) <br> (c) <h1> (d) <li>
- 27.True or false: <ol> is an unordered list. (a) True (b) False
- 28.True or false: HTML on its own cannot make links to pages. (a) False (b) True
-
29.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) href (b) Art corner (c) games.html (d) Maths fun -
30.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>Cricket is fun.</h4>
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>The red kite</h2> - 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 32.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 33.📝 What does <p> make? (a) a table (b) a picture (c) a link (d) a paragraph
- 34.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 35.True or false: <li> is an unordered list. (a) True (b) False
- 36.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 37.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 38.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <head>
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
-
40.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png
Answer key
- -->
- alt
- Cricket Club
- <ol>
- 6
- about.html
- True
- Fun facts
- No
- </em>
- <h4>
- href
- False
- 1
- About us
- a web browser
- Yes
- 100
- <meta charset="utf-8">
- games.html
- a code editor
- answers page requests
- shows pages from the web
- a closing tag
- <h5>
- <br>
- False
- False
- Maths fun
- 3
- <h6>
- True
- a paragraph
- <h1>
- False
- <ul>
- False
- </html>
- <h6>
- tiger.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids