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.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 2.🔍 Which is the odd one out? (a) saves our .html files (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
- 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 4.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
- 5.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Welcome! (c) body (d) Class 7 Blog - 7.True or false: <ul> lists things in any order. (a) False (b) True
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
- 9.True or false: <li> is an ordered list. (a) True (b) False
- 10.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 11.Which of these is true of a web browser? (a) colours code to help us (b) turns HTML into a page (c) answers page requests (d) sends pages over the net
- 12.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
-
13.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Maths fun (c) href (d) Visit the site -
14.🔍 One closing tag is missing. Which one?
<h2>Hello, world!
<em>I love mangoes.</em>
<strong>Our school trip</strong> (a) </em> (b) </h2> (c) </strong> (d) </b> - 15.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h2>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
- 16.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
-
17.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus -
18.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>I love mangoes.</h2>
<p>Fun facts</p>
<h2>My best friend</h2> - 19.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 20.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 21.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .html (d) .txt
-
22.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) art.html (b) https://example.com (c) Contact us (d) maths.html - 23.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
-
24.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<p>The red kite</p>
<h2>My best friend</h2> - 25.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <br>
- 26.Which of these is true of a web browser? (a) has an address bar (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
-
27.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>I love mangoes.</p>
<p>My pets</p>
<h2>My pets</h2> - 28.True or false: <input> is an empty tag. (a) False (b) True
- 29.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </html> (c) <!DOCTYPE html> (d) <body>
- 30.True or false: in <img>, width describes the picture. (a) False (b) True
- 31.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
-
32.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
</ul> - 33.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> -
35.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) Fun facts (b) My pets (c) My best friend (d) Good morning! - 36.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.True or false: <ul> goes in the body. (a) True (b) False
- 40.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
Answer key
- in the head
- saves our .html files
- <ol>
- height
- src
- Welcome!
- True
- <h1>
- False
- in the head
- turns HTML into a page
- <!--
- Visit the site
- </h2>
- <h6>
- <
- bus.jpg
- 2
- False
- <ol>
- .html
- https://example.com
- <a>
- 2
- <br>
- has an address bar
- 2
- True
- </html>
- False
- <a href="about.html">
- 3
- an opening tag
- 300
- Fun facts
- an empty tag
- 2
- an opening tag
- True
- opens it in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids