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 headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<p>Fun facts</p>
<h2>Fun facts</h2>
<p>Rain today</p> - 2.True or false: a code editor sends pages over the net. (a) False (b) True
- 3.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
4.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) quiz.html (d) games.html -
5.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p> - 6.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
7.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) School news (b) Take the quiz (c) href (d) art.html -
8.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 9.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h5>
- 10.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
- 11.True or false: in <img>, alt names the picture file. (a) True (b) False
-
12.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Birds sing</p> -
13.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<h3>Our school trip</h3>
<p>My pets</p> - 14.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <ul>
-
15.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<h3>My pets</h3> - 16.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
17.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<h3>My best friend</h3>
<h2>Rain today (a) </i> (b) </strong> (c) </h2> (d) </h3> - 18.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) has an address bar (d) opens web pages for us
-
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) My drawings (c) Riya’s Recipes (d) body - 20.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
- 21.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 22.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
-
23.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> --> (a) The red kite (b) Fun facts (c) My best friend (d) Our school trip - 24.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h4>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
-
25.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Good morning!</h2>
<h2>Good morning!</h2>
<p>The red kite</p>
<p>Good morning!</p> - 26.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.Which of these is an empty tag? (a) <li> (b) <title> (c) <b> (d) <img>
-
28.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 29.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
- 30.🏷️ Which is the closing tag for <em>? (a) <em> (b) <\em> (c) <em/> (d) </em>
- 31.Which of these is a closing tag? (a) <b> (b) <body> (c) </body> (d) <li>
-
32.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>My pets</p> - 33.True or false: in <img>, src shows if the image fails. (a) False (b) True
- 34.Which of these is true of a web server? (a) saves our .html files (b) answers page requests (c) opens web pages for us (d) shows line numbers
- 35.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 36.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound
- 37.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="150"> - 39.True or false: HTML on its own cannot pick a random number. (a) False (b) True
- 40.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
Answer key
- 2
- False
- an opening tag
- news.html
- 2
- in the body
- School news
- numbers
- <h1>
- a paragraph
- False
- 3
- 2
- <ul>
- 2
- an opening tag
- </h2>
- is where we type code
- My drawings
- a line across the page
- Yes
- the body
- Fun facts
- <h1>
- 3
- has a closing tag
- <img>
- 2
- <h2>
- </em>
- </body>
- 2
- False
- answers page requests
- <ol>
- structure
- height
- 150
- True
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids