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 is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
-
2.🔗 Where does this link open?
<a href="news.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 3.True or false: <table> goes in the body. (a) True (b) False
- 4.Which of these goes in the body? (a) <title> (b) <p> (c) <link rel="stylesheet"> (d) <style>
- 5.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
- 6.Which of these is true of a web browser? (a) hosts websites online (b) opens web pages for us (c) sends pages over the net (d) is where we type code
-
7.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<h2>Rain today</h2>
<h2>My pets</h2>
<p>Good morning!</p> - 8.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 9.True or false: in <img>, height is read by screen readers. (a) True (b) False
-
10.🔍 Which line is missing its closing tag?
line 1: <strong>Fun facts</strong>
line 2: <u>Rain today
line 3: <b>Cricket is fun.</b> (a) line 2 (b) line 1 (c) line 3 -
11.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>My pets</p> (a) Cricket is fun. (b) My pets (c) Rain today - 12.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 14.True or false: a code editor turns HTML into a page. (a) False (b) True
- 15.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
- 16.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 17.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
- 18.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) is where we type code (d) colours code to help us
- 19.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 20.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
-
21.🔍 Which line is missing its closing tag?
line 1: <h2>My pets</h2>
line 2: <h1>Cricket is fun.</h1>
line 3: <strong>Hello, world! (a) line 1 (b) line 2 (c) line 3 -
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake -
23.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in a new tab (b) in the same tab - 24.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 25.Which of these is an empty tag? (a) <p> (b) <meta> (c) <li> (d) <h1>
-
26.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) games.html (d) quiz.html - 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
- 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
- 29.🌍 Which program shows a web page to us? (a) a music player (b) a web browser (c) a paint program (d) a calculator
-
30.🔍 One closing tag is missing. Which one?
<em>My best friend</em>
<b>Our school trip
<h2>I love mangoes.</h2> (a) </h2> (b) </h1> (c) </b> (d) </em> - 31.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 32.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
- 33.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 35.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
-
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) map.png (b) Birthday cake (c) width (d) Map of India - 37.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) secret text (d) text with links
- 38.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="250"> -
40.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets
Answer key
- <h1>
- in a new tab
- True
- <p>
- alt
- opens web pages for us
- 3
- 6
- False
- line 2
- Rain today
- in the body
- in the head
- False
- <a>
- in the head
- Markup
- stores a website’s files
- a web server
- <h1>
- line 3
- Birthday cake
- in the same tab
- False
- <meta>
- news.html
- <h1>
- <h5>
- a web browser
- </b>
- Yes
- <head>
- True
- 400
- <!DOCTYPE html>
- Map of India
- text with links
- <img>
- 250
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids