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 is a closing tag? (a) <b> (b) </p> (c) <title> (d) <h1>
- 2.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
- 3.💬 Does the browser show comments on the page? (a) Yes (b) No
- 4.🔍 Which is the odd one out? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) colours code to help us
- 5.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
-
6.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> --> -
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) width (b) Our school bus (c) bus.jpg (d) An old fort - 8.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
- 9.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
- 10.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 11.Which of these is true of a code editor? (a) answers page requests (b) stores a website’s files (c) turns HTML into a page (d) shows line numbers
- 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 13.Which of these goes in the body? (a) <img> (b) <title> (c) <meta charset="utf-8"> (d) <style>
-
14.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<p>Rain today</p>
<p>Our school trip</p> -
15.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) https://example.com (c) maths.html (d) contact.html -
16.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
17.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.
<small>I love mangoes.</small>
<h2>My pets</h2> (a) </h3> (b) </small> (c) </i> (d) </h2> - 18.True or false: <ul> shows bullet points. (a) True (b) False
- 19.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
20.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) about.html (b) games.html (c) Maths fun (d) contact.html - 21.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
-
22.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<p>My best friend</p>
<h4>Good morning!</h4>
<p>Good morning!</p> - 23.True or false: <input> is an empty tag. (a) True (b) False
- 24.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
- 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 26.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 27.True or false: a web browser is where we type code. (a) False (b) True
-
28.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> - 29.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
30.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ol> -
31.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<!-- <p>Rain today</p> --> - 32.True or false: <li> is an empty tag. (a) True (b) False
- 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
- 34.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 35.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
- 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
- 37.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
-
39.🔗 Where does this link open?
<a href="about.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
Answer key
- </p>
- a paragraph
- No
- turns HTML into a page
- height
- 2
- Our school bus
- <!--
- src
- href
- shows line numbers
- Yes
- <img>
- 4
- contact.html
- in a new tab
- </i>
- True
- -->
- games.html
- a web browser
- 2
- True
- a plain text editor
- No
- alt
- False
- 2
- in the body
- 7
- 1
- False
- <li>
- True
- <ol>
- 6
- Yes
- <ol>
- in a new tab
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids