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: <img> has a closing tag. (a) True (b) False
- 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
3.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<h2>My pets</h2>
<p>Cricket is fun.</p>
<h2>Good morning!</h2>
<h2>The red kite</h2> - 4.True or false: a web browser opens web pages for us. (a) False (b) True
- 5.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) width (c) The full moon (d) dog.jpg - 7.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 8.Which of these goes in the head? (a) <a> (b) <ul> (c) <title> (d) <table>
- 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
- 10.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 11.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
12.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in a new tab (b) in the same tab - 13.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
- 14.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
15.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> --> - 16.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) colours code to help us
- 17.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 18.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
- 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) answers page requests (d) opens web pages for us
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) Map of India (b) A red kite (c) kite.png (d) width - 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
- 23.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
- 24.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
- 25.True or false: <h1> is an empty tag. (a) True (b) False
-
26.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) Visit the site (c) Maths fun (d) href - 27.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 28.True or false: a web server answers page requests. (a) True (b) False
-
29.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p> - 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 31.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
- 33.Which of these is an opening tag? (a) </h1> (b) <p> (c) </li> (d) </p>
- 34.True or false: HTML on its own can make links to pages. (a) True (b) False
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width - 36.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.🔗 Where does this link open?
<a href="quiz.html">Contact us</a> (a) in a new tab (b) in the same tab -
38.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
39.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My best friend</p>
<h2>Fun facts</h2> - 40.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
Answer key
- False
- No
- 3
- True
- Yes
- A happy dog
- <h1>
- <title>
- <h2>
- a web server
- an empty tag
- in the same tab
- <h6>
- True
- 1
- colours code to help us
- <ul>
- <h1>
- has a closing tag
- answers page requests
- A red kite
- a slash /
- <h1>
- </p>
- False
- Visit the site
- opens it in a new tab
- True
- 2
- <li>
- in the body
- <!DOCTYPE html>
- <p>
- True
- Birthday cake
- an empty tag
- in the same tab
- in a new tab
- 2
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids