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 do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a printer (d) a microphone
- 2.True or false: <table> goes in the body. (a) False (b) True
- 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<h1>Cricket is fun.
<h2>Good morning!</h2> (a) </u> (b) </i> (c) </h1> (d) </h2> - 5.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <li>
- 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 7.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
-
8.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> (a) Hello, world! (b) The red kite (c) I love mangoes. -
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Match report (b) Class 7 Blog (c) We won by 5 runs. (d) index.html -
10.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> (a) Rain today (b) Cricket is fun. (c) Fun facts (d) I love mangoes. - 11.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
- 12.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
-
13.🔍 One closing tag is missing. Which one?
<h3>My pets
<b>Hello, world!</b>
<u>Cricket is fun.</u> (a) </b> (b) </u> (c) </h3> (d) </em> - 14.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </head> (c) </html> (d) </body>
- 16.True or false: <ol> is an ordered list. (a) True (b) False
- 17.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
-
18.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) quiz.html (b) news.html (c) Contact us (d) art.html - 19.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) turns HTML into a page (d) is where we type code
- 20.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> -
22.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) I love mangoes. (c) Rain today (d) Our school trip - 23.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <style> (d) <title>
- 24.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
-
25.📋 What number does the browser show next to “Guava”?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 26.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) <!DOCTYPE html> (b) </head>
- 27.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <meta>
- 28.Which of these goes in the body? (a) <style> (b) <title> (c) <h1> (d) <meta charset="utf-8">
-
29.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <h1>My best friend
line 3: <i>Good morning!</i> (a) line 3 (b) line 2 (c) line 1 - 30.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
-
31.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in the same tab (b) in a new tab - 32.True or false: <title> has a closing tag. (a) False (b) True
- 33.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
-
34.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<h4>Hello, world!</h4>
<p>The red kite</p> - 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 36.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
38.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My drawings (b) body (c) Thanks for visiting. (d) Cricket Club - 39.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
-
40.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Grapes</li>
</ul>
Answer key
- a plain text editor
- True
- an opening tag
- </h1>
- <li>
- to leave notes
- <h6>
- I love mangoes.
- Class 7 Blog
- Cricket is fun.
- <h6>
- a line across the page
- </h3>
- opens it in a new tab
- </html>
- True
- <
- art.html
- is where we type code
- <ul>
- 50
- My best friend
- <p>
- </h1>
- 3
- <!DOCTYPE html>
- <p>
- <h1>
- line 2
- text with links
- in the same tab
- True
- element
- 2
- No
- 1
- Yes
- My drawings
- a paragraph
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids