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 of these goes in the body? (a) <p> (b) <meta charset="utf-8"> (c) <title> (d) <style>
- 2.Which of these is a closing tag? (a) <body> (b) <title> (c) </h1> (d) <b>
-
3.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<h2>I love mangoes.</h2> -
4.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) contact.html (c) games.html (d) Contact us -
5.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> - 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 7.True or false: <meta> has a closing tag. (a) False (b) True
- 8.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
- 9.True or false: <style> goes in the body. (a) True (b) False
- 10.True or false: HTML on its own can make links to pages. (a) True (b) False
- 11.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
12.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>The red kite</p>
<h3>My pets</h3> -
13.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) School news (b) Take the quiz (c) art.html (d) href - 14.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 16.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
- 17.Which of these goes in the body? (a) <img> (b) <link rel="stylesheet"> (c) <style> (d) <meta charset="utf-8">
-
18.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>Rain today</p> -
19.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 20.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
- 21.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 22.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 23.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
- 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 25.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg -
27.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) Visit the site (c) href (d) Contact us -
28.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Kites fly high<br>Roses are red<br>Birds sing</p> - 29.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
-
30.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png - 31.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 32.True or false: HTML on its own can make tables. (a) False (b) True
- 33.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
- 34.💬 Does the browser show comments on the page? (a) No (b) Yes
-
35.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) about.html (b) Maths fun (c) contact.html (d) https://example.com - 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
-
37.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>My pets</h3>
<p>My best friend</p>
<p>The red kite</p>
<p>Good morning!</p> - 38.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 40.True or false: in <img>, height describes the picture. (a) True (b) False
Answer key
- <p>
- </h1>
- 2
- games.html
- 100
- Yes
- False
- starts a new line
- False
- True
- in the body
- 2
- School news
- <ul>
- in the head
- to leave notes
- <img>
- 4
- numbers
- <h1>
- in the body
- a web browser
- width
- <h6>
- <h6>
- A tiger asleep
- Contact us
- 5
- href
- map.png
- 1
- True
- </p>
- No
- about.html
- the body
- 2
- Yes
- <ol>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids