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 one is where we type code? (a) a web browser (b) a code editor (c) a web server
- 2.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
-
3.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) quiz.html (b) Play games (c) Take the quiz (d) href -
4.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Hello, world!</h4>
<h3>Cricket is fun.</h3>
<h4>Good morning!</h4>
<p>Our school trip</p> -
5.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
6.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<h2>I love mangoes.</h2>
<h2>My pets</h2>
<p>My best friend</p> - 7.True or false: a web server hosts websites online. (a) True (b) False
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 10.True or false: <h1> is an empty tag. (a) False (b) True
- 11.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <style> (d) <img>
- 12.💬 Does the browser show comments on the page? (a) Yes (b) No
-
13.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> -
14.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in the same tab (b) in a new tab -
15.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite</strong>
line 2: <u>Good morning!
line 3: <small>Fun facts</small> (a) line 2 (b) line 3 (c) line 1 - 16.Which of these is an opening tag? (a) </b> (b) </body> (c) </p> (d) <h1>
- 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
- 18.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
-
19.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) Play games (b) https://example.com (c) href (d) About us - 20.True or false: <ol> is one item of a list. (a) False (b) True
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg -
22.🔗 Where does this link open?
<a href="maths.html">Art corner</a> (a) in the same tab (b) in a new tab - 23.Which of these goes in the head? (a) <title> (b) <h1> (c) <table> (d) <ul>
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 25.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
- 26.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
27.🔍 One closing tag is missing. Which one?
<i>The red kite
<em>My pets</em>
<b>Rain today</b> (a) </i> (b) </h3> (c) </em> (d) </b> - 28.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
- 29.True or false: a web browser has an address bar. (a) False (b) True
- 30.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
- 31.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
-
32.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Fun facts</p>
<p>Good morning!</p> (a) Good morning! (b) Rain today (c) Our school trip (d) Fun facts - 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 34.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) saves our .html files
- 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 36.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Link (d) Laptop
- 37.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
- 38.True or false: a web browser colours code to help us. (a) True (b) False
- 39.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
- 40.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
Answer key
- a code editor
- <h4>
- Take the quiz
- 4
- bullets
- 2
- True
- 200
- Yes
- False
- <img>
- No
- 3
- in the same tab
- line 2
- <h1>
- <img>
- <head>
- Play games
- False
- Birthday cake
- in the same tab
- <title>
- 350
- to leave notes
- a closing tag
- </i>
- <h6>
- True
- <!--
- -->
- Our school trip
- <ol>
- turns HTML into a page
- Yes
- Language
- </b>
- False
- 1
- the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids