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.True or false: <ul> shows bullet points. (a) False (b) True
- 2.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
- 3.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 4.True or false: a web server opens web pages for us. (a) False (b) True
-
5.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p> - 6.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
- 7.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
-
8.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>My best friend</h4>
<p>My best friend</p> - 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 10.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 11.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
- 12.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
- 13.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 14.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
- 15.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
-
16.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<h4>Our school trip</h4>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2> - 17.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
-
18.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) about.html (b) https://example.com (c) contact.html (d) Take the quiz -
19.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
</ul> - 20.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
-
21.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) About us (b) news.html (c) Play games (d) href - 22.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
-
23.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) My pets (b) Cricket is fun. (c) I love mangoes. (d) My best friend - 24.True or false: <b> is an empty tag. (a) False (b) True
- 25.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
-
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Cricket Club (b) index.html (c) Welcome! (d) Thanks for visiting. - 27.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a music player (d) a web browser
-
28.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
</ol> -
29.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) dog.jpg (b) The full moon (c) A happy dog (d) width - 31.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
- 32.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
-
33.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <i>The red kite
line 3: <h1>Fun facts</h1> (a) line 3 (b) line 2 (c) line 1 -
34.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> - 35.True or false: <ol> shows bullet points. (a) True (b) False
- 36.True or false: HTML on its own can make bullet lists. (a) False (b) True
-
37.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> -
38.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
- 40.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
Answer key
- True
- to leave notes
- <h1>
- False
- 2
- a slash /
- alt
- 2
- in the body
- <a href="about.html">
- an attribute
- <h1>
- True
- a web server
- <a>
- 3
- <h2>
- about.html
- 2
- <h6>
- Play games
- on the browser tab
- Cricket is fun.
- False
- True
- Cricket Club
- a web browser
- 4
- 2
- A happy dog
- <h2>
- <h6>
- line 2
- 4
- False
- True
- 1
- 4
- <h1>
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids