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 attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
-
2.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 3.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) is where we type code (d) stores a website’s files
- 4.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
- 5.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys
-
6.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
-
9.🖼️ 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) tiger.jpg (c) width (d) A tiger asleep - 10.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
11.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Orange</li>
<li>Papaya</li>
<li>Guava</li>
</ul> -
12.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) about.html (b) Play games (c) games.html (d) quiz.html - 13.Which of these is true of a web browser? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) shows line numbers
- 14.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
- 15.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <img>
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets -
17.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ul> -
18.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>My pets</p> - 19.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
-
20.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 21.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) saves our .html files (d) turns HTML into a page
- 22.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </p>
- 23.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
-
24.🔍 Which line is missing its closing tag?
line 1: <p>My pets</p>
line 2: <b>I love mangoes.</b>
line 3: <i>Rain today (a) line 2 (b) line 1 (c) line 3 - 25.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
- 26.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) body (c) Planets (d) My Hobbies - 28.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 29.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
- 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 31.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
- 32.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<em>Cricket is fun.
<u>Rain today</u> (a) </u> (b) </em> (c) </h1> (d) </h2> -
34.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 35.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <p> (d) <\p>
- 36.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 38.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h2> (b) <h3> (c) <h5> (d) <h4>
-
39.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) art.html (b) Contact us (c) maths.html (d) news.html - 40.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
Answer key
- alt
- 3
- is where we type code
- <h5>
- tags
- bullets
- in the body
- <h1>
- A tiger asleep
- an opening tag
- 5
- quiz.html
- opens web pages for us
- </i>
- <title>
- numbers
- 4
- 4
- <h1>
- bullets
- turns HTML into a page
- </p>
- <h6>
- line 3
- <h1>
- 6
- Planets
- has a closing tag
- <img>
- <ul>
- a web browser
- a closing tag
- </em>
- 250
- </p>
- height
- 100
- <h2>
- maths.html
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids