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 does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<p>Good morning!</p> - 2.True or false: in <img>, width shows if the image fails. (a) False (b) True
-
3.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Papaya</li>
</ul> - 4.True or false: a code editor has an address bar. (a) True (b) False
-
5.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Rain today</p> (a) Our school trip (b) Rain today (c) My pets - 6.Which of these is true of a web browser? (a) sends pages over the net (b) shows pages from the web (c) saves our .html files (d) stores a website’s files
- 7.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h2>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
-
8.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>The red kite</h2>
<p>Hello, world!</p>
<p>My best friend</p> - 9.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
- 10.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
-
11.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> --> - 12.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 13.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
-
14.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<h3>Good morning!</h3>
<em>Cricket is fun.</em> (a) </h2> (b) </em> (c) </h3> (d) </h1> -
15.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 16.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </body> (d) </html>
- 17.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 18.True or false: <ul> lists things in any order. (a) True (b) False
- 19.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
- 20.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> -
22.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> -
23.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) maths.html (b) Contact us (c) art.html (d) https://example.com - 24.Which of these goes in the head? (a) <p> (b) <ul> (c) <h1> (d) <meta charset="utf-8">
- 25.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1/> (d) <h1>
-
26.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> (a) My pets (b) Our school trip (c) Hello, world! (d) Cricket is fun. - 27.Which of these goes in the head? (a) <img> (b) <ul> (c) <title> (d) <p>
-
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My Hobbies (b) index.html (c) We won by 5 runs. (d) My drawings - 29.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) </body>
- 30.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 31.True or false: <ul> is an empty tag. (a) False (b) True
- 32.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
- 33.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <b> (d) <li>
- 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
35.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 36.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
37.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Our school trip</h2>
<p>I love mangoes.</p> - 38.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 39.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
40.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>I love mangoes.</h2>
<p>Good morning!</p>
Answer key
- 3
- False
- 2
- False
- Our school trip
- shows pages from the web
- <h2>
- 2
- <img>
- <h1>
- 1
- <ul>
- .html
- </h1>
- in a new tab
- </html>
- in the body
- True
- <h6>
- 1
- 100
- 2
- https://example.com
- <meta charset="utf-8">
- </h1>
- Cricket is fun.
- <title>
- My Hobbies
- <!DOCTYPE html>
- True
- False
- <li>
- </h1>
- in the head
- bullets
- <ul>
- 2
- <h1>
- No
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids