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.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> - 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
-
3.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> -
4.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) I love mangoes. (d) Hello, world! - 5.True or false: a web server colours code to help us. (a) False (b) True
- 6.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 7.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 8.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
-
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Easy snacks (b) Thanks for visiting. (c) index.html (d) Cricket Club -
10.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers -
11.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) Cricket is fun. (c) Rain today -
12.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) Art corner (b) games.html (c) about.html (d) contact.html - 13.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) <body>
-
14.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="250"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png -
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Sky is blue</p> - 16.Which of these is an empty tag? (a) <img> (b) <p> (c) <li> (d) <ul>
- 17.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
- 18.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 19.True or false: a web browser has an address bar. (a) True (b) False
- 20.True or false: <a> goes in the body. (a) False (b) True
-
21.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) news.html (b) href (c) Contact us (d) Visit the site - 22.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 23.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
-
24.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high</p> - 25.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
- 26.Which of these is true of a code editor? (a) shows pages from the web (b) stores a website’s files (c) is where we type code (d) opens web pages for us
- 27.📄 Can HTML on its own make headings? (a) No (b) Yes
-
28.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Birds sing<br>Roses are red</p> -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) The full moon (b) A happy dog (c) dog.jpg (d) width - 30.Which of these goes in the body? (a) <style> (b) <title> (c) <h1> (d) <link rel="stylesheet">
-
31.🔍 One closing tag is missing. Which one?
<b>Fun facts
<i>Cricket is fun.</i>
<em>My best friend</em> (a) </h2> (b) </em> (c) </b> (d) </i> -
32.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) art.html (b) href (c) Art corner (d) Maths fun -
33.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>My pets</p> (a) Cricket is fun. (b) Hello, world! (c) My pets (d) My best friend - 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="100"> - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
- 37.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
-
38.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>My best friend</h3>
<p>Cricket is fun.</p>
<h4>Rain today</h4>
<p>Our school trip</p> -
39.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Cricket is fun.</h4>
<p>Hello, world!</p>
<h2>Our school trip</h2> -
40.🔗 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
Answer key
- 2
- <a>
- 3
- Hello, world!
- False
- False
- <ul>
- height
- Cricket Club
- numbers
- I love mangoes.
- games.html
- <!DOCTYPE html>
- map.png
- 3
- <img>
- <!DOCTYPE html>
- in the body
- True
- True
- Contact us
- Yes
- <ul>
- 2
- 6
- is where we type code
- Yes
- 4
- A happy dog
- <h1>
- </b>
- Maths fun
- Hello, world!
- <a href="about.html">
- 100
- <h1>
- <img>
- 3
- 3
- art.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids