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 part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
- 2.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
-
3.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> (a) The red kite (b) My best friend (c) My pets -
4.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg -
5.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets -
6.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> - 7.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <html>
- 8.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
- 10.📄 Can HTML on its own make links to pages? (a) No (b) Yes
-
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Match report (c) index.html (d) Class 7 Blog -
12.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) https://example.com (b) contact.html (c) about.html (d) Visit the site - 13.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
-
14.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Rain today</p> - 15.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h2>
- 16.True or false: <input> has a closing tag. (a) True (b) False
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
- 18.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
-
19.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> -
20.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Stars shine<br>Sky is blue<br>Rivers flow</p> -
21.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) quiz.html (b) Play games (c) news.html (d) art.html - 22.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
- 23.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
- 24.True or false: a web browser shows pages from the web. (a) False (b) True
-
25.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 26.True or false: <li> lists steps in order. (a) True (b) False
-
27.📋 What number does the browser show next to “Guava”?
<ol start="3">
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
28.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in the same tab (b) in a new tab -
29.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip
line 2: <i>My pets</i>
line 3: <h3>Good morning!</h3> (a) line 1 (b) line 3 (c) line 2 - 30.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 31.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
-
32.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> (a) Fun facts (b) My pets (c) My best friend - 33.Which of these is true of a code editor? (a) opens web pages for us (b) hosts websites online (c) shows pages from the web (d) saves our .html files
-
34.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>Hello, world!</p> (a) Our school trip (b) Fun facts (c) Hello, world! - 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 36.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <br>
-
37.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Good morning!</h2>
<h2>The red kite</h2> - 38.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
-
39.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Cricket is fun.</p>
<h3>Hello, world!</h3> - 40.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- the body
- <h6>
- My pets
- bus.jpg
- numbers
- 2
- </html>
- a closing tag
- <!DOCTYPE html>
- Yes
- Class 7 Blog
- about.html
- a line across the page
- 3
- <h6>
- False
- <h4>
- <a>
- 150
- 5
- art.html
- </strong>
- a web browser
- True
- numbers
- False
- 5
- in the same tab
- line 1
- <
- on the browser tab
- Fun facts
- saves our .html files
- Fun facts
- opens it in a new tab
- <p>
- 3
- <li>
- 2
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids