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.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 2.Which of these is an opening tag? (a) </b> (b) </h1> (c) </p> (d) <h1>
- 3.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) School news (b) href (c) Take the quiz (d) games.html - 5.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) src (d) alt
-
7.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> - 8.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
- 9.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
-
10.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> - 11.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
- 12.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) Our school bus (c) moon.png (d) width -
14.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) Good morning! (d) Cricket is fun. - 15.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 16.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
- 17.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
-
18.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A tiger asleep (b) tiger.jpg (c) map.png (d) kite.png -
19.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="100"> - 20.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p> (d) <p/>
- 21.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol> - 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
- 24.True or false: <ol> lists steps in order. (a) True (b) False
-
25.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<h2>I love mangoes.</h2>
<h4>Cricket is fun.</h4> - 26.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
-
27.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png - 28.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 29.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
- 30.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
-
31.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite</h1>
line 2: <h2>My pets</h2>
line 3: <p>Good morning! (a) line 1 (b) line 2 (c) line 3 -
32.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) games.html (b) contact.html (c) about.html (d) Take the quiz - 33.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) index.html (c) My Hobbies (d) Planets -
35.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today
line 2: <strong>Good morning!</strong>
line 3: <em>I love mangoes.</em> (a) line 3 (b) line 1 (c) line 2 -
36.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>My pets</h3>
<p>I love mangoes.</p>
<h3>Our school trip</h3>
<p>Rain today</p> - 37.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Easy snacks (b) I like to read. (c) index.html (d) My Hobbies -
39.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> -
40.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350">
Answer key
- Yes
- <h1>
- an opening tag
- School news
- <
- alt
- 2
- on the browser tab
- <img>
- 3
- to describe the image
- <li>
- The full moon
- Our school trip
- <ul>
- 6
- a line across the page
- tiger.jpg
- 100
- </p>
- an opening tag
- 2
- a slash /
- True
- 3
- <h1>
- moon.png
- in the head
- <h5>
- <h5>
- line 3
- games.html
- in the body
- My Hobbies
- line 1
- 3
- <li>
- My Hobbies
- 2
- 350
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids