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 text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) The red kite (b) Hello, world! (c) Cricket is fun. - 2.True or false: <img> has a closing tag. (a) False (b) True
-
3.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) All about me (b) index.html (c) Mars is red. (d) Art Gallery -
4.🔍 Which line is missing its closing tag?
line 1: <b>Rain today
line 2: <u>My pets</u>
line 3: <h2>I love mangoes.</h2> (a) line 3 (b) line 2 (c) line 1 - 5.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) colours code to help us (d) opens web pages for us
-
6.📋 What number does the browser show next to “Orange”?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
</ol> -
7.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Good morning!</p> (a) Good morning! (b) Rain today (c) My pets (d) Our school trip -
8.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> (a) Fun facts (b) Good morning! (c) My pets -
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) index.html (c) Planets (d) Class 7 Blog - 10.True or false: <p> goes in the head. (a) False (b) True
- 11.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 12.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) opens web pages for us (d) hosts websites online
-
13.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> - 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
- 15.Which of these is a closing tag? (a) </body> (b) <title> (c) <body> (d) <p>
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) width (c) Our school bus (d) The full moon -
17.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>My pets</p> (a) My best friend (b) My pets (c) I love mangoes. (d) Rain today - 18.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 19.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
- 21.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
22.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> -
23.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Fun facts</h4>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<h4>Our school trip</h4> -
24.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
</ol> -
25.📋 What number does the browser show next to “Mango”?
<ol start="2">
<li>Papaya</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 26.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
27.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 28.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
-
29.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in the same tab (b) in a new tab - 30.Which of these is a closing tag? (a) </li> (b) <body> (c) <h1> (d) <li>
- 31.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
-
32.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) quiz.html (b) School news (c) news.html (d) games.html - 33.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 34.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
-
36.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>I love mangoes.</h4>
<p>I love mangoes.</p>
<p>Good morning!</p> - 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
- 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
-
39.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>The red kite</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> -
40.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in a new tab (b) in the same tab
Answer key
- The red kite
- False
- Art Gallery
- line 1
- opens web pages for us
- 2
- Our school trip
- Fun facts
- Class 7 Blog
- False
- True
- opens web pages for us
- 2
- opens it in a new tab
- </body>
- The full moon
- My best friend
- in the head
- <h6>
- on the browser tab
- a closing tag
- 1
- 3
- 2
- 3
- has a closing tag
- 3
- <h1>
- in the same tab
- </li>
- height
- news.html
- No
- <img>
- <h1>
- 2
- 1
- as one space
- 4
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids