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 heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
-
2.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) news.html (b) art.html (c) maths.html (d) About us - 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
-
4.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> - 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
- 6.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 7.True or false: <img> is an empty tag. (a) False (b) True
- 8.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 9.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 10.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
- 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 12.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>I love mangoes.</p>
<h2>The red kite</h2>
<p>Rain today</p>
<h4>Rain today</h4> - 14.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
-
15.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My best friend</h2>
<p>Rain today</p>
<h2>I love mangoes.</h2>
<p>Fun facts</p> - 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
- 17.True or false: <ul> shows bullet points. (a) True (b) False
- 18.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 19.True or false: <ul> is an ordered list. (a) False (b) True
- 20.True or false: HTML on its own cannot make tables. (a) True (b) False
- 21.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) shows line numbers (d) hosts websites online
-
22.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in the same tab (b) in a new tab - 23.True or false: <ol> is an ordered list. (a) True (b) False
- 24.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 25.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <!DOCTYPE html> (c) </head> (d) </html>
-
26.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg - 27.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 29.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 30.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 31.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 32.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
-
33.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Rain today</h3>
<p>Fun facts</p>
<p>Cricket is fun.</p> - 34.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
35.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="250"> (a) dog.jpg (b) cake.jpg (c) Map of India (d) map.png - 36.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
-
37.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) href (b) https://example.com (c) Take the quiz (d) School news - 38.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
39.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ol> -
40.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Papaya</li>
</ul>
Answer key
- <h1>
- maths.html
- <img>
- 3
- <h6>
- in the body
- True
- No
- Yes
- an attribute
- <ol>
- an opening tag
- 3
- src
- 3
- <a href="about.html">
- True
- a web browser
- False
- False
- turns HTML into a page
- in the same tab
- True
- a web browser
- <!DOCTYPE html>
- fort.jpg
- a closing tag
- True
- -->
- has a closing tag
- opens it in a new tab
- the body
- 2
- <h1>
- map.png
- <h2>
- School news
- False
- 4
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids