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 odd one out? (a) stores a website’s files (b) saves our .html files (c) shows line numbers (d) is where we type code
-
2.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) My best friend (b) Rain today (c) Good morning! (d) Cricket is fun. - 3.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
- 4.True or false: <img> has a closing tag. (a) True (b) False
-
5.🔍 One closing tag is missing. Which one?
<p>Cricket is fun.</p>
<h3>Fun facts</h3>
<u>My best friend (a) </u> (b) </h3> (c) </small> (d) </p> - 6.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
-
7.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) href (b) Contact us (c) art.html (d) About us - 8.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 9.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
- 10.True or false: a code editor saves our .html files. (a) False (b) True
- 11.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 12.Which of these is a closing tag? (a) <title> (b) <body> (c) </b> (d) <li>
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 14.Which of these is an empty tag? (a) <li> (b) <br> (c) <title> (d) <b>
-
15.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png - 16.True or false: a web server has an address bar. (a) False (b) True
- 17.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
- 18.Which of these is an opening tag? (a) </p> (b) </h1> (c) </title> (d) <h1>
- 19.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 20.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
-
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Riya’s Recipes (b) Thanks for visiting. (c) Easy snacks (d) body - 22.True or false: a web server shows line numbers. (a) False (b) True
- 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 24.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 25.Which of these goes in the head? (a) <table> (b) <img> (c) <h1> (d) <link rel="stylesheet">
- 26.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 27.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
-
28.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> (a) Fun facts (b) My pets (c) Cricket is fun. (d) Hello, world! -
29.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) href (b) Maths fun (c) Art corner (d) https://example.com - 30.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
- 31.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
32.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="350"> - 33.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <a> (c) <h1> (d) <table>
- 34.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
- 35.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 36.True or false: <ol> is an ordered list. (a) False (b) True
-
37.🔗 Where does this link open?
<a href="about.html">Maths fun</a> (a) in the same tab (b) in a new tab - 38.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 40.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
Answer key
- stores a website’s files
- Good morning!
- to describe the image
- False
- </u>
- starts a new line
- About us
- True
- <li>
- True
- False
- </b>
- 350
- <br>
- map.png
- False
- tags
- <h1>
- False
- <
- Easy snacks
- False
- <!DOCTYPE html>
- False
- <link rel="stylesheet">
- <ol>
- opens it in a new tab
- Hello, world!
- Maths fun
- element
- a web browser
- 350
- <meta charset="utf-8">
- <h6>
- <h1>
- True
- in the same tab
- False
- Yes
- the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids