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>Cricket is fun.</p> -->
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<!-- <p>Rain today</p> --> - 2.True or false: a web server saves our .html files. (a) True (b) False
- 3.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
5.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<p>Good morning!</p>
<h3>My best friend</h3>
<p>Good morning!</p> - 6.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
-
7.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Good morning!</p>
<p>The red kite</p> (a) Hello, world! (b) The red kite (c) Good morning! (d) Rain today -
8.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> - 9.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <html>
- 10.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
- 11.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
-
12.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Rain today</h2>
<p>Fun facts</p>
<h2>I love mangoes.</h2> - 13.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 14.🔗 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
-
15.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>The red kite</p>
<h2>I love mangoes.</h2>
<h2>Rain today</h2> -
16.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<h4>Hello, world!</h4>
<h2>Hello, world!</h2> -
17.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>My pets</p> - 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
- 19.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
- 20.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) is where we type code
- 21.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) shows pages from the web (d) hosts websites online
- 22.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <p>
- 23.True or false: <h1> goes in the body. (a) True (b) False
- 24.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
-
25.🔍 One closing tag is missing. Which one?
<h3>The red kite</h3>
<b>Good morning!
<i>Our school trip</i> (a) </h1> (b) </b> (c) </i> (d) </h3> - 26.Which of these is a closing tag? (a) <title> (b) <b> (c) </h1> (d) <li>
- 27.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
- 28.True or false: HTML on its own can show paragraphs. (a) False (b) True
- 29.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
-
31.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Hello, world!</h2>
<p>My best friend</p>
<p>Rain today</p>
<p>My best friend</p> - 32.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
33.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow<br>Kites fly high</p> -
34.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) Thanks for visiting. (c) body (d) Art Gallery -
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Match report (c) index.html (d) Space Facts -
36.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>My best friend</h3>
<h3>I love mangoes.</h3>
<h3>Cricket is fun.</h3> - 37.Which of these is an opening tag? (a) </body> (b) <p> (c) </b> (d) </li>
- 38.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 39.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
- 40.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
Answer key
- 1
- False
- in the body
- <ul>
- 2
- </h1>
- Hello, world!
- 2
- <!DOCTYPE html>
- <h6>
- <h6>
- 2
- <li>
- opens it in a new tab
- 2
- 3
- 2
- element
- <html>
- turns HTML into a page
- shows pages from the web
- <p>
- True
- a line across the page
- </b>
- </h1>
- <h1>
- True
- a closing tag
- a code editor
- 4
- -->
- 4
- Match report
- Space Facts
- 4
- <p>
- an empty tag
- an attribute
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids