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 tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 2.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
- 3.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 4.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
- 5.True or false: <ul> is an ordered list. (a) False (b) True
- 6.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) saves our .html files (d) turns HTML into a page
- 7.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 8.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 9.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) <h3/> (d) </h3>
-
10.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>Our school trip</h3>
<p>I love mangoes.</p>
<h4>Hello, world!</h4> - 11.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
-
12.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="200"> (a) moon.png (b) bus.jpg (c) fort.jpg (d) The full moon - 13.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) is where we type code (d) colours code to help us
- 14.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) is where we type code
- 15.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) keys (d) pixels
- 16.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
17.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
18.🔗 Where does this link open?
<a href="news.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab -
19.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> - 20.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
- 21.Which of these is true of a web server? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) turns HTML into a page
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Easy snacks (c) Class 7 Blog (d) index.html - 23.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
- 24.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
-
25.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<u>Our school trip</u>
<i>My pets (a) </em> (b) </i> (c) </h1> (d) </u> - 26.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
-
27.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> - 28.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
-
29.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>I love mangoes.</p> -
30.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My pets</p>
<h4>Good morning!</h4>
<h3>My pets</h3> - 31.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h1>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
- 32.True or false: a code editor opens web pages for us. (a) True (b) False
- 33.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 34.True or false: <ul> lists things in any order. (a) False (b) True
- 35.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
-
36.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Our school trip</p>
<p>Cricket is fun.</p> (a) Our school trip (b) I love mangoes. (c) My pets (d) Cricket is fun. - 37.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 38.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
- 39.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
-
40.🔍 One closing tag is missing. Which one?
<p>Rain today</p>
<em>My best friend</em>
<i>Our school trip (a) </h2> (b) </p> (c) </em> (d) </i>
Answer key
- <a>
- on the browser tab
- a web server
- <h2>
- False
- turns HTML into a page
- <li>
- No
- </h3>
- 3
- <
- moon.png
- shows pages from the web
- is where we type code
- tags
- in the head
- 3
- in a new tab
- 150
- src
- hosts websites online
- Class 7 Blog
- <!DOCTYPE html>
- <h6>
- </i>
- <h6>
- 2
- <!--
- 5
- 3
- <h6>
- False
- an opening tag
- True
- href
- I love mangoes.
- to leave notes
- <h5>
- Yes
- </i>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids