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.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
- 2.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
-
3.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) Play games (b) href (c) art.html (d) About us -
4.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>My pets</p> (a) Cricket is fun. (b) My pets (c) Rain today -
5.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) art.html (c) maths.html (d) news.html -
6.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 7.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
- 8.True or false: a web browser colours code to help us. (a) False (b) True
- 9.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) alt (d) width
- 10.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
-
11.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png -
12.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> -
13.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) href (b) Art corner (c) Maths fun (d) contact.html -
14.📄 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>I like to read.</p>
</body>
</html> (a) index.html (b) Riya’s Recipes (c) Match report (d) I like to read. -
15.📋 What number does the browser show next to “Banana”?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Banana</li>
</ol> -
16.🔗 Where does this link open?
<a href="games.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 17.True or false: in <img>, src shows if the image fails. (a) True (b) False
- 18.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
- 19.True or false: in <img>, src names the picture file. (a) True (b) False
-
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) index.html (c) My Hobbies (d) My drawings -
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width - 22.True or false: <br> is an empty tag. (a) False (b) True
- 23.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
- 24.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
-
25.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> --> - 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) has an address bar (d) shows pages from the web
-
27.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> (a) Cricket is fun. (b) My pets (c) Good morning! (d) The red kite - 28.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
-
29.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> (a) My pets (b) Good morning! (c) My best friend - 30.Which of these is an opening tag? (a) <p> (b) </h1> (c) </p> (d) </title>
-
31.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) School news (b) Art corner (c) quiz.html (d) href - 32.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
-
33.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) My pets (b) Cricket is fun. (c) Good morning! - 34.💬 Does the browser show comments on the page? (a) Yes (b) No
- 35.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 36.Which of these is true of a web server? (a) opens web pages for us (b) shows line numbers (c) is where we type code (d) stores a website’s files
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="250"> (a) A tiger asleep (b) fort.jpg (c) An old fort (d) width -
38.🔍 One closing tag is missing. Which one?
<h2>Fun facts</h2>
<em>My pets
<p>Good morning!</p> (a) </em> (b) </p> (c) </h2> (d) </small> - 39.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 40.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) <body> (b) </html>
Answer key
- 6
- <a>
- Play games
- Rain today
- maths.html
- in a new tab
- <li>
- False
- alt
- a web server
- tiger.jpg
- 350
- Maths fun
- Riya’s Recipes
- 3
- in a new tab
- False
- opens it in a new tab
- True
- My Hobbies
- A tiger asleep
- True
- <!DOCTYPE html>
- starts a new line
- 2
- hosts websites online
- Good morning!
- <h1>
- My pets
- <p>
- Art corner
- <!--
- Cricket is fun.
- No
- False
- stores a website’s files
- An old fort
- </em>
- True
- <body>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids