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 of these is true of a web server? (a) colours code to help us (b) is where we type code (c) answers page requests (d) shows line numbers
- 2.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
-
3.📋 What number does the browser show next to “Papaya”?
<ol start="6">
<li>Grapes</li>
<li>Papaya</li>
<li>Mango</li>
<li>Guava</li>
</ol> -
4.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>The red kite</p> (a) My best friend (b) The red kite (c) My pets - 5.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
-
6.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) Contact us (b) href (c) Visit the site (d) art.html - 7.Which of these is an empty tag? (a) <ul> (b) <p> (c) <li> (d) <meta>
- 8.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 9.Which of these is true of a web server? (a) is where we type code (b) has an address bar (c) shows line numbers (d) stores a website’s files
-
10.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 11.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
-
12.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Good morning!</p>
<p>The red kite</p> - 13.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 14.True or false: a web browser saves our .html files. (a) False (b) True
- 15.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 16.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
17.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<h2>My pets</h2>
<h2>Fun facts</h2> -
18.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400"> - 19.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 20.📄 Can HTML on its own make tables? (a) Yes (b) No
-
21.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <p>Hello, world!</p>
line 3: <em>Rain today</em> (a) line 2 (b) line 1 (c) line 3 -
22.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) href (b) Contact us (c) about.html (d) Visit the site - 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
-
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) My Hobbies (c) index.html (d) Mars is red. - 25.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
-
26.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> - 27.True or false: <title> goes in the body. (a) False (b) True
- 28.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) body (c) Cricket Club (d) Thanks for visiting. -
30.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>Rain today</p>
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) Good morning! (d) Cricket is fun. -
31.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
32.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
-
36.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) Visit the site (b) games.html (c) quiz.html (d) news.html - 37.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) pixels (d) wires
- 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 39.Which of these has a closing tag? (a) <img> (b) <br> (c) <ul> (d) <meta>
- 40.Which of these is an opening tag? (a) </p> (b) </h1> (c) </b> (d) <title>
Answer key
- answers page requests
- <li>
- 7
- My best friend
- Language
- Contact us
- <meta>
- <!--
- stores a website’s files
- 5
- True
- 1
- in the body
- False
- <h1>
- a closing tag
- 3
- 400
- <h4>
- Yes
- line 1
- Contact us
- width
- My Hobbies
- <h5>
- 2
- False
- <h1>
- Match report
- Cricket is fun.
- in a new tab
- 150
- an empty tag
- bullets
- opens it in a new tab
- news.html
- tags
- <img>
- <ul>
- <title>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids