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.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
2.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> --> - 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) games.html (b) Visit the site (c) about.html (d) contact.html - 5.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
- 6.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 7.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
-
8.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>The red kite</p>
<p>The red kite</p>
<p>Fun facts</p>
<h3>Cricket is fun.</h3> - 9.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
-
10.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) href (b) maths.html (c) Maths fun (d) Visit the site -
11.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> - 12.True or false: <ul> goes in the body. (a) False (b) True
- 13.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 14.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
-
15.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in a new tab (b) in the same tab -
16.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) contact.html (d) https://example.com - 17.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
- 18.Which of these is true of a web browser? (a) sends pages over the net (b) has an address bar (c) stores a website’s files (d) is where we type code
- 19.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 20.True or false: HTML on its own can run a game loop. (a) True (b) False
- 21.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.Which of these goes in the head? (a) <img> (b) <p> (c) <ul> (d) <meta charset="utf-8">
-
23.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> - 24.Which of these is true of a code editor? (a) is where we type code (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
- 25.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
- 26.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 27.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
- 28.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
29.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) about.html (b) quiz.html (c) Contact us (d) games.html - 30.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 31.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) </i> (d) <\i>
- 32.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) Contact us (b) art.html (c) href (d) Visit the site -
34.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Fun facts</p> - 35.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
-
36.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
</ul> - 37.🔗 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
- 38.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) width (b) A red kite (c) Map of India (d) kite.png -
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Thanks for visiting. (c) Match report (d) Riya’s Recipes
Answer key
- a closing tag
- 1
- an opening tag
- games.html
- alt
- an empty tag
- height
- 2
- <h1>
- Visit the site
- 1
- True
- <h6>
- src
- in the same tab
- contact.html
- the body
- has an address bar
- <!DOCTYPE html>
- False
- has a closing tag
- <meta charset="utf-8">
- 1
- is where we type code
- a paragraph
- a web browser
- <h2>
- has a closing tag
- quiz.html
- alt
- </i>
- an opening tag
- Contact us
- 4
- <ol>
- 4
- opens it in a new tab
- <h1>
- A red kite
- Riya’s Recipes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids