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 puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
- 2.Which of these is true of a web browser? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) is where we type code
-
3.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) map.png (c) cake.jpg (d) A red kite -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) map.png (b) Birthday cake (c) Map of India (d) width - 5.Which of these is true of a web server? (a) saves our .html files (b) sends pages over the net (c) has an address bar (d) turns HTML into a page
- 6.True or false: <title> goes in the body. (a) False (b) True
- 7.True or false: in <img>, src tells which image to load. (a) True (b) False
- 8.True or false: <a> goes in the head. (a) True (b) False
-
9.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Hello, world!</p>
<p>My pets</p> (a) My best friend (b) Hello, world! (c) Good morning! (d) My pets - 10.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
-
11.🔍 One closing tag is missing. Which one?
<em>Rain today</em>
<h3>I love mangoes.</h3>
<i>Cricket is fun. (a) </small> (b) </h3> (c) </i> (d) </em> -
12.🔍 Which line is missing its closing tag?
line 1: <small>Fun facts</small>
line 2: <em>The red kite
line 3: <p>Hello, world!</p> (a) line 1 (b) line 3 (c) line 2 - 13.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) <html>
-
14.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Hello, world!</p> (a) The red kite (b) Our school trip (c) Hello, world! - 15.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <table>
- 16.True or false: <ul> is an empty tag. (a) False (b) True
- 17.Which of these is a closing tag? (a) <p> (b) <title> (c) </p> (d) <h1>
-
18.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<h2>Our school trip</h2>
<h2>Fun facts</h2> -
19.🔍 One closing tag is missing. Which one?
<p>Rain today
<b>I love mangoes.</b>
<h1>My best friend</h1> (a) </h2> (b) </b> (c) </h1> (d) </p> -
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Cricket Club (b) index.html (c) Try this poha. (d) Easy snacks - 21.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 22.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) bus.jpg (b) Our school bus (c) An old fort (d) width - 24.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
- 25.True or false: HTML on its own cannot make headings. (a) True (b) False
- 26.Which of these has a closing tag? (a) <img> (b) <meta> (c) <br> (d) <b>
- 27.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Cricket Club (b) index.html (c) My drawings (d) Mars is red. - 29.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 30.True or false: a web browser opens web pages for us. (a) False (b) True
- 31.True or false: in <img>, width names the picture file. (a) True (b) False
- 32.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 34.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 35.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
-
36.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Kites fly high</p> -
37.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) href (b) Art corner (c) Maths fun (d) art.html -
38.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) maths.html (c) art.html (d) news.html - 39.True or false: <ol> is an unordered list. (a) True (b) False
-
40.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>The red kite</p>
<h4>Good morning!</h4>
<p>My pets</p>
Answer key
- <img>
- opens web pages for us
- kite.png
- Map of India
- sends pages over the net
- False
- True
- False
- Good morning!
- -->
- </i>
- line 2
- <!DOCTYPE html>
- Our school trip
- <table>
- False
- </p>
- 4
- </p>
- Cricket Club
- <ol>
- a code editor
- Our school bus
- a web browser
- False
- <b>
- False
- Cricket Club
- False
- True
- False
- <ul>
- <a href="about.html">
- 6
- on the browser tab
- 3
- Maths fun
- maths.html
- False
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids