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 the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
- 2.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a paint program (d) a web browser
-
3.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Cricket is fun.</h4>
<h4>Fun facts</h4> -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) map.png (b) Map of India (c) width (d) Birthday cake - 5.True or false: <li> has a closing tag. (a) False (b) True
- 6.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 7.True or false: <title> goes in the head. (a) False (b) True
-
8.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>My pets</p> (a) Rain today (b) My pets (c) Our school trip (d) The red kite -
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>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) index.html (c) Planets (d) Mars is red. - 10.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
11.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Our school trip</p> - 12.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
- 13.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <ul> (d) <p>
- 14.True or false: in <img>, src names the picture file. (a) False (b) True
-
15.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) fort.jpg (b) The full moon (c) bus.jpg (d) moon.png - 16.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 17.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
18.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) Contact us (b) about.html (c) About us (d) href - 19.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
-
20.🔍 One closing tag is missing. Which one?
<small>Our school trip</small>
<em>Hello, world!
<p>Rain today</p> (a) </h1> (b) </p> (c) </small> (d) </em> - 21.Which of these is true of a web browser? (a) hosts websites online (b) is where we type code (c) turns HTML into a page (d) saves our .html files
- 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 23.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) shows pages from the web (d) is where we type code
- 24.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 26.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
-
27.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Cricket is fun. (c) Fun facts (d) Hello, world! - 28.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) bus.jpg (b) An old fort (c) Our school bus (d) width -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) bus.jpg (b) Our school bus (c) An old fort (d) width - 31.True or false: HTML on its own can run a game loop. (a) False (b) True
- 32.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
- 33.True or false: <hr> is an empty tag. (a) True (b) False
- 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 35.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 36.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
- 37.Which of these is an opening tag? (a) </body> (b) </p> (c) <h1> (d) </title>
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) Birthday cake (b) width (c) map.png (d) Map of India - 39.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 40.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
Answer key
- on the browser tab
- a web browser
- 3
- Map of India
- True
- <h1>
- True
- The red kite
- Class 7 Blog
- in the body
- 3
- a code editor
- <meta>
- True
- moon.png
- in the body
- Yes
- About us
- <h6>
- </em>
- turns HTML into a page
- No
- shows pages from the web
- </b>
- bullets
- <h1>
- My best friend
- -->
- Our school bus
- Our school bus
- False
- <!DOCTYPE html>
- True
- <ol>
- a closing tag
- starts a new line
- <h1>
- Map of India
- href
- src
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids