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: HTML on its own can add pictures to a page. (a) True (b) False
- 2.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 3.True or false: a code editor colours code to help us. (a) False (b) True
- 4.Which of these is an opening tag? (a) </h1> (b) <p> (c) </p> (d) </li>
- 5.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
6.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Our school trip</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p> - 7.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <head> (c) <html> (d) <!DOCTYPE html>
-
8.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<h3>Good morning!</h3>
<p>Our school trip</p> - 9.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> -
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) Cricket Club (b) Planets (c) index.html (d) I like to read. - 12.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
-
14.🔗 Where does this link open?
<a href="maths.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 15.True or false: HTML on its own can count button clicks. (a) False (b) True
- 16.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
- 18.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
-
19.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> --> -
20.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Rain today</p> --> - 21.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
22.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My best friend</p>
<p>I love mangoes.</p> -
23.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p> - 24.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
-
25.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) About us (b) href (c) maths.html (d) Contact us -
26.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My pets</p>
<p>Hello, world!</p>
<h4>The red kite</h4>
<p>Our school trip</p> -
27.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) maths.html (b) art.html (c) https://example.com (d) Maths fun - 28.True or false: HTML on its own can keep a high score. (a) False (b) True
-
29.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in the same tab (b) in a new tab - 30.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
31.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> -
32.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> -
33.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> -
34.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> (a) My best friend (b) I love mangoes. (c) Fun facts (d) Hello, world! -
35.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) contact.html (b) Visit the site (c) href (d) Maths fun -
36.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) href (c) Contact us (d) Visit the site -
37.🔍 Which line is missing its closing tag?
line 1: <small>Good morning!
line 2: <b>My pets</b>
line 3: <u>I love mangoes.</u> (a) line 2 (b) line 3 (c) line 1 -
38.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<p>My pets</p>
<p>My best friend</p>
<h2>Our school trip</h2> - 39.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 40.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
Answer key
- True
- False
- True
- <p>
- <ul>
- 3
- <!DOCTYPE html>
- 2
- <h1>
- 100
- Cricket Club
- an opening tag
- shows pages from the web
- in a new tab
- False
- an empty tag
- to describe the image
- on the browser tab
- 1
- 1
- <ul>
- 1
- 2
- an attribute
- About us
- 2
- https://example.com
- False
- in the same tab
- in the body
- 2
- 5
- 400
- Hello, world!
- Visit the site
- Contact us
- line 1
- 4
- has a closing tag
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids