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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) Match report (c) Thanks for visiting. (d) index.html - 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
-
3.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<!-- <p>My best friend</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> --> - 4.True or false: <ul> lists things in any order. (a) True (b) False
-
5.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
</ul> - 6.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
- 7.True or false: in <img>, alt describes the picture. (a) True (b) False
- 8.True or false: in <img>, alt names the picture file. (a) False (b) True
- 9.True or false: <ul> is an empty tag. (a) True (b) False
- 10.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
-
11.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>My pets</p> -
12.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<i>Our school trip</i>
<h3>Fun facts (a) </h3> (b) </i> (c) </u> (d) </em> -
13.🔍 Which line is missing its closing tag?
line 1: <b>My pets</b>
line 2: <strong>Good morning!</strong>
line 3: <h1>Hello, world! (a) line 2 (b) line 1 (c) line 3 - 14.True or false: <ol> shows bullet points. (a) True (b) False
- 15.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 16.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) height (d) src
- 17.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
- 18.Which of these is true of a web server? (a) shows line numbers (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
-
19.📄 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) Easy snacks (d) Try this poha. - 20.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 21.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
-
22.🔍 One closing tag is missing. Which one?
<em>Cricket is fun.</em>
<i>My pets</i>
<h1>The red kite (a) </h3> (b) </h1> (c) </i> (d) </em> - 23.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) height (d) width
-
24.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Rain today</h2>
<p>I love mangoes.</p>
<h4>Good morning!</h4>
<h4>Rain today</h4> -
25.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) news.html (c) Play games (d) games.html - 26.Which of these is a closing tag? (a) <body> (b) <title> (c) <li> (d) </h1>
-
27.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) art.html (b) quiz.html (c) Contact us (d) news.html -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg -
29.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p> (a) My pets (b) Hello, world! (c) Our school trip (d) Cricket is fun. - 30.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
-
31.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Art Gallery (b) Welcome! (c) Here is my best one. (d) body - 32.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
-
33.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>Fun facts</p>
<p>My pets</p> - 34.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
- 35.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <i> (d) <\i>
- 36.Which of these is true of a code editor? (a) colours code to help us (b) has an address bar (c) opens web pages for us (d) answers page requests
- 37.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
- 38.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
39.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Our school trip (c) Cricket is fun. -
40.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers
Answer key
- My Hobbies
- <img>
- 1
- True
- 6
- <h6>
- True
- False
- False
- <h1>
- 3
- </h3>
- line 3
- False
- <ol>
- alt
- a code editor
- hosts websites online
- Cricket Club
- a web browser
- to describe the image
- </h1>
- alt
- 4
- news.html
- </h1>
- art.html
- A tiger asleep
- Hello, world!
- tags
- Welcome!
- src
- 3
- a web browser
- </i>
- colours code to help us
- <!DOCTYPE html>
- a closing tag
- Fun facts
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids