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.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> - 2.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
-
3.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
4.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) games.html (b) news.html (c) Contact us (d) quiz.html - 5.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
- 6.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <!DOCTYPE html> (d) </head>
-
7.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) games.html (d) href - 8.Which of these goes in the body? (a) <style> (b) <img> (c) <meta charset="utf-8"> (d) <title>
- 9.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
- 10.Which of these is an empty tag? (a) <hr> (b) <ul> (c) <p> (d) <title>
-
11.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> - 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 13.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
-
14.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Fun facts</p> (a) Fun facts (b) My pets (c) Our school trip -
15.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) art.html (b) news.html (c) School news (d) maths.html - 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.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) Planets (c) Cricket Club (d) I like to read. -
18.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Good morning!</h2>
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<p>My best friend</p> - 19.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
-
20.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Rain today</h2>
<h2>Our school trip</h2>
<p>The red kite</p>
<h2>Rain today</h2>
<p>My best friend</p> - 21.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
22.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> - 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 24.Which of these is an opening tag? (a) </body> (b) <p> (c) </h1> (d) </p>
- 25.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 26.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
27.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>Cricket is fun.</p>
<h4>Hello, world!</h4> - 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
-
29.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Banana</li>
<li>Litchi</li>
</ul> - 30.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
- 31.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
-
32.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> -
33.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) art.html (c) School news (d) Take the quiz - 34.Which of these is true of a web server? (a) shows pages from the web (b) answers page requests (c) turns HTML into a page (d) shows line numbers
- 35.True or false: <title> goes in the body. (a) True (b) False
- 36.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
- 37.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
-
38.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> - 39.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 40.True or false: in <img>, height describes the picture. (a) True (b) False
Answer key
- 2
- starts a new line
- 4
- news.html
- alt
- <!DOCTYPE html>
- Take the quiz
- <img>
- 6
- <hr>
- 1
- has a closing tag
- the body
- Our school trip
- maths.html
- to describe the image
- Planets
- 4
- opens it in a new tab
- 3
- in the head
- 2
- has a closing tag
- <p>
- False
- a web browser
- 2
- height
- 5
- <h2>
- <ol>
- 3
- School news
- answers page requests
- False
- a line across the page
- <li>
- 2
- True
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids