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.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> - 2.Which of these goes in the body? (a) <title> (b) <style> (c) <link rel="stylesheet"> (d) <ul>
- 3.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
-
4.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My pets</p>
<p>Good morning!</p>
<p>I love mangoes.</p>
<h3>My pets</h3> - 5.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
- 6.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
7.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
8.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) About us (b) href (c) art.html (d) Play games -
9.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 10.Which of these is true of a web browser? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) sends pages over the net
- 11.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
-
13.📋 What number does the browser show next to “Jamun”?
<ol start="2">
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
14.📄 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) Class 7 Blog (b) Try this poha. (c) Welcome! (d) body -
15.🔍 Which line is missing its closing tag?
line 1: <em>My pets</em>
line 2: <i>I love mangoes.
line 3: <h1>Fun facts</h1> (a) line 1 (b) line 3 (c) line 2 - 16.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
17.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
18.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Cricket is fun.</h3>
<p>Fun facts</p>
<p>Good morning!</p>
<p>My best friend</p> - 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 20.True or false: <li> goes inside ul or ol. (a) False (b) True
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) width (b) Our school bus (c) moon.png (d) The full moon -
23.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> -->
<p>Fun facts</p> - 24.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
25.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) about.html (b) Play games (c) href (d) Take the quiz - 26.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
- 27.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
-
28.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My pets</h2>
<h2>My best friend</h2>
<p>Our school trip</p> -
29.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> - 30.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
-
31.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in a new tab (b) in the same tab -
32.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>Fun facts</h4>
<p>Fun facts</p>
<p>Hello, world!</p> -
33.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> (a) Cricket is fun. (b) The red kite (c) Rain today - 34.True or false: <ol> lists steps in order. (a) False (b) True
- 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
- 36.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
- 37.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <meta charset="utf-8">
-
38.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 39.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) editor (d) attribute
- 40.True or false: <ul> is an unordered list. (a) False (b) True
Answer key
- 3
- <ul>
- -->
- 2
- a web server
- Yes
- bullets
- Play games
- 100
- shows pages from the web
- on the browser tab
- <h6>
- 4
- Welcome!
- line 2
- True
- 4
- 2
- Yes
- True
- 200
- The full moon
- 1
- <ul>
- Take the quiz
- src
- <a>
- 2
- 2
- <h4>
- in the same tab
- 2
- Rain today
- True
- <h1>
- href
- <meta charset="utf-8">
- in a new tab
- element
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids