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 is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Easy snacks (c) Mars is red. (d) My Hobbies - 2.💬 Does the browser show comments on the page? (a) No (b) Yes
- 3.True or false: <li> has a closing tag. (a) False (b) True
- 4.True or false: a web browser has an address bar. (a) False (b) True
-
5.🔍 Which line is missing its closing tag?
line 1: <i>Fun facts
line 2: <p>Our school trip</p>
line 3: <small>I love mangoes.</small> (a) line 3 (b) line 2 (c) line 1 - 6.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
-
7.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> -
8.🔍 Which line is missing its closing tag?
line 1: <strong>Fun facts</strong>
line 2: <p>Our school trip
line 3: <small>My pets</small> (a) line 1 (b) line 2 (c) line 3 - 9.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
- 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> -
12.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in a new tab (b) in the same tab - 13.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) has an address bar (d) hosts websites online
- 14.True or false: HTML on its own can add up two numbers. (a) True (b) False
-
15.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) games.html (b) quiz.html (c) news.html (d) Play games - 16.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
- 17.True or false: in <img>, src names the picture file. (a) False (b) True
-
18.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) href (b) Take the quiz (c) art.html (d) Play games - 19.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <body> (d) <!DOCTYPE html>
- 20.🔗 What does HyperText mean? (a) secret text (b) text with links (c) very big text (d) text in colour
- 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) body (c) Thanks for visiting. (d) Welcome! - 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
-
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting. - 25.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 26.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
- 27.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 28.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 30.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 31.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 32.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
- 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <ul>
- 34.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
-
35.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in a new tab (b) in the same tab - 36.Which of these is true of a web server? (a) is where we type code (b) hosts websites online (c) colours code to help us (d) shows line numbers
-
37.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) href (c) about.html (d) Take the quiz -
38.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 39.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 40.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- Easy snacks
- No
- True
- True
- line 1
- <h2>
- 2
- line 2
- <h2>
- Yes
- 300
- in the same tab
- has an address bar
- False
- news.html
- to describe the image
- True
- Take the quiz
- <!DOCTYPE html>
- text with links
- <a href="about.html">
- Welcome!
- width
- Space Facts
- <a>
- </h1>
- 1
- <!DOCTYPE html>
- No
- <ol>
- <li>
- height
- <ul>
- <!--
- in the same tab
- hosts websites online
- Take the quiz
- 200
- <ol>
- a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids