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 is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
-
2.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<p>Fun facts</p> (a) Fun facts (b) My best friend (c) My pets -
3.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) Maths fun (c) https://example.com (d) href -
4.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> - 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 7.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
-
8.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Good morning!</p> -
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) My drawings (b) I like to read. (c) body (d) Space Facts - 10.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 11.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 12.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 13.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 14.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
-
15.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> (a) The red kite (b) I love mangoes. (c) Fun facts - 16.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
-
17.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My pets</p>
<p>Good morning!</p>
<h3>Fun facts</h3> - 18.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
20.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>The red kite</p>
<p>The red kite</p>
<h2>Hello, world!</h2>
<p>I love mangoes.</p> - 21.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
- 22.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
- 24.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
- 25.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 26.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 27.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
28.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) About us (b) news.html (c) maths.html (d) art.html - 29.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
-
30.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Our school trip (c) My pets (d) My best friend -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) Birthday cake (b) width (c) A happy dog (d) cake.jpg - 32.Which of these is an opening tag? (a) </b> (b) </body> (c) </h1> (d) <p>
-
33.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<h2>My pets</h2>
<strong>Cricket is fun. (a) </h1> (b) </strong> (c) </h2> (d) </em> - 34.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 35.True or false: <ol> shows bullet points. (a) False (b) True
-
36.🔍 One closing tag is missing. Which one?
<i>Our school trip
<h3>Good morning!</h3>
<h2>My pets</h2> (a) </h2> (b) </small> (c) </h3> (d) </i> -
37.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>My best friend</p>
<h4>Fun facts</h4>
<h3>My pets</h3> -
38.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 39.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
40.🔍 One closing tag is missing. Which one?
<u>My best friend</u>
<h1>My pets
<strong>Cricket is fun.</strong> (a) </h1> (b) </strong> (c) </h2> (d) </u>
Answer key
- </i>
- My pets
- Visit the site
- 2
- <a href="about.html">
- 100
- <ul>
- 2
- My drawings
- <li>
- Yes
- <a>
- True
- a paragraph
- Fun facts
- a code editor
- 2
- True
- an opening tag
- 5
- <h1>
- an opening tag
- href
- <h6>
- <ul>
- <!DOCTYPE html>
- an empty tag
- maths.html
- to describe the image
- My best friend
- Birthday cake
- <p>
- </strong>
- width
- False
- </i>
- 3
- 5
- <li>
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids