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.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
- 2.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
- 3.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 4.💬 Does the browser show comments on the page? (a) Yes (b) No
-
5.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> - 6.True or false: <b> is an empty tag. (a) True (b) False
- 7.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> - 9.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
- 10.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
-
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) My Hobbies (c) Easy snacks (d) I like to read. - 12.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <body>
- 13.True or false: HTML on its own can run a game loop. (a) False (b) True
- 14.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
- 15.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 16.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
17.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) Contact us (b) news.html (c) href (d) About us -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) An old fort (b) width (c) Our school bus (d) bus.jpg - 19.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Class 7 Blog (b) body (c) Try this poha. (d) Match report - 21.Which of these has a closing tag? (a) <img> (b) <br> (c) <ul> (d) <input>
-
22.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets -
23.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) about.html (b) https://example.com (c) Visit the site (d) contact.html -
24.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) maths.html (b) https://example.com (c) About us (d) contact.html - 25.Which of these is true of a web server? (a) hosts websites online (b) is where we type code (c) saves our .html files (d) has an address bar
- 26.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <title>
- 27.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) answers page requests (d) shows line numbers
- 28.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 29.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
-
30.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> (a) The red kite (b) My best friend (c) Cricket is fun. -
31.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Rivers flow</p> - 32.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
- 33.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
- 34.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 35.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
- 36.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 37.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <h6> (d) <br>
- 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 39.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Class 7 Blog (b) All about me (c) We won by 5 runs. (d) index.html
Answer key
- an attribute
- <a>
- <li>
- No
- 6
- False
- <!DOCTYPE html>
- 400
- as one space
- <h4>
- Easy snacks
- <body>
- False
- <h6>
- opens it in a new tab
- to leave notes
- About us
- Our school bus
- element
- Match report
- <ul>
- numbers
- about.html
- contact.html
- hosts websites online
- <title>
- answers page requests
- Yes
- alt
- My best friend
- 5
- <h6>
- <h6>
- <h1>
- <h1>
- in the body
- <h1>
- href
- an empty tag
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids