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.True or false: <ol> lists steps in order. (a) True (b) False
- 2.True or false: <input> is an empty tag. (a) True (b) False
- 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 5.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
6.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 7.True or false: <ul> is an empty tag. (a) False (b) True
- 8.True or false: <br> has a closing tag. (a) True (b) False
- 9.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
- 10.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
11.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png -
12.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>Our school trip</p>
<h2>Cricket is fun.</h2>
<h2>Cricket is fun.</h2> -
13.🔍 One closing tag is missing. Which one?
<b>I love mangoes.</b>
<strong>My best friend
<p>Hello, world!</p> (a) </b> (b) </p> (c) </u> (d) </strong> -
14.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) href (d) Play games - 15.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
- 16.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 17.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
- 18.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
-
19.📋 What number does the browser show next to “Guava”?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
</ol> -
20.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) contact.html (b) Take the quiz (c) href (d) School news - 21.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) is where we type code (d) turns HTML into a page
-
22.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) games.html - 23.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 24.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 25.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
- 26.True or false: <li> is an empty tag. (a) False (b) True
-
27.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) contact.html (b) https://example.com (c) Contact us (d) maths.html - 28.Which of these is true of a web server? (a) opens web pages for us (b) is where we type code (c) saves our .html files (d) stores a website’s files
-
29.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>Fun facts</p> - 30.True or false: a web server shows pages from the web. (a) True (b) False
- 31.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
32.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 33.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 34.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
35.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 36.True or false: <ol> is an unordered list. (a) False (b) True
-
37.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.
line 2: <u>My best friend</u>
line 3: <h1>Fun facts</h1> (a) line 3 (b) line 2 (c) line 1 - 38.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <\strong> (c) <strong/> (d) <strong>
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width - 40.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
Answer key
- True
- True
- an opening tag
- True
- <ol>
- 3
- False
- False
- <a>
- in the body
- fort.jpg
- 3
- </strong>
- Take the quiz
- <!--
- Yes
- src
- Markup
- 3
- School news
- is where we type code
- Take the quiz
- False
- href
- the body
- False
- contact.html
- stores a website’s files
- 1
- False
- <ul>
- bullets
- True
- False
- 3
- False
- line 1
- </strong>
- A tiger asleep
- starts a new line
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids