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 <ul> go: in the head or in the body? (a) in the head (b) in the body
- 2.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
-
3.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) games.html (b) quiz.html (c) Take the quiz (d) news.html - 4.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
5.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) news.html (b) Art corner (c) art.html (d) quiz.html - 6.🖼️ 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
- 7.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) saves our .html files (d) shows line numbers
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) Our school bus (b) bus.jpg (c) width (d) An old fort - 9.True or false: <ul> shows bullet points. (a) False (b) True
-
10.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> --> - 11.Which of these is an empty tag? (a) <title> (b) <p> (c) <input> (d) <h1>
-
12.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> -
13.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
14.📄 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>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Thanks for visiting. (c) All about me (d) Class 7 Blog -
15.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in a new tab (b) in the same tab - 16.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
- 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
- 19.📄 Can HTML on its own make a form? (a) Yes (b) No
- 20.True or false: a web browser sends pages over the net. (a) False (b) True
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> - 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 23.True or false: <br> is an empty tag. (a) True (b) False
- 24.💬 Does the browser show comments on the page? (a) No (b) Yes
- 25.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
26.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Papaya</li>
</ol> - 27.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 28.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
- 29.True or false: <ol> lists steps in order. (a) True (b) False
- 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
-
31.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) Contact us (c) href (d) About us -
32.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> -
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Fun facts</h3>
<p>Rain today</p> - 34.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 35.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
-
37.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> (a) Hello, world! (b) My best friend (c) Rain today - 38.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
- 39.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
40.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) maths.html (c) art.html (d) https://example.com
Answer key
- in the body
- opens it in a new tab
- news.html
- Yes
- art.html
- to describe the image
- hosts websites online
- Our school bus
- True
- 1
- <input>
- 3
- 2
- Class 7 Blog
- in the same tab
- Yes
- 1
- <h6>
- Yes
- False
- 150
- Yes
- True
- No
- Yes
- 2
- has a closing tag
- Language
- True
- <h2>
- About us
- 350
- 2
- an empty tag
- <ul>
- a slash /
- My best friend
- alt
- src
- https://example.com
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids