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.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="150"> - 2.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
-
3.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) All about me (c) index.html (d) Cricket Club - 4.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
- 5.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
-
6.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<h2>Our school trip</h2>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p> - 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h3>
-
8.🔗 Where does this link open?
<a href="news.html">School news</a> (a) in a new tab (b) in the same tab -
9.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Fun facts</h2>
<h2>Cricket is fun.</h2> - 10.True or false: <h1> is an empty tag. (a) True (b) False
- 11.💬 Does the browser show comments on the page? (a) Yes (b) No
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> -
13.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p> -
14.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) Play games (b) news.html (c) quiz.html (d) art.html - 15.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h5>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
18.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Orange</li>
</ul> -
19.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) Take the quiz (b) href (c) School news (d) about.html - 20.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
- 21.True or false: <h1> has a closing tag. (a) False (b) True
-
22.🔗 Where does this link open?
<a href="https://example.com">Play games</a> (a) in the same tab (b) in a new tab - 23.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 24.True or false: HTML on its own can make headings. (a) False (b) True
-
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) width (b) Our school bus (c) moon.png (d) The full moon - 26.🏷️ Which is the closing tag for <p>? (a) </p> (b) <\p> (c) <p> (d) <p/>
- 27.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 28.Which of these goes in the head? (a) <h1> (b) <style> (c) <table> (d) <ul>
-
29.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<p>Fun facts</p> - 30.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
31.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 32.🔍 Which is the odd one out? (a) hosts websites online (b) opens web pages for us (c) sends pages over the net (d) answers page requests
- 33.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 35.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 37.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) colours code to help us
- 38.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
-
39.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>The red kite</p>
<p>I love mangoes.</p> -
40.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!
line 2: <h1>Cricket is fun.</h1>
line 3: <i>Hello, world!</i> (a) line 2 (b) line 3 (c) line 1
Answer key
- 150
- <ol>
- Cricket Club
- opens it in a new tab
- </strong>
- 4
- <h1>
- in the same tab
- 1
- False
- No
- 350
- 2
- art.html
- No
- <h6>
- a closing tag
- 5
- School news
- src
- True
- in the same tab
- a code editor
- True
- The full moon
- </p>
- a web browser
- <style>
- 1
- an opening tag
- 6
- opens web pages for us
- in the body
- src
- a closing tag
- has a closing tag
- colours code to help us
- 6
- 1
- line 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids