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.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
-
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) Planets (c) We won by 5 runs. (d) body - 3.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
-
4.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) Maths fun (b) news.html (c) href (d) Art corner -
5.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<p>Our school trip</p>
<p>My pets</p>
<p>I love mangoes.</p> - 6.True or false: a code editor opens web pages for us. (a) True (b) False
-
7.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
<li>Mango</li>
</ul> - 8.True or false: a web browser shows pages from the web. (a) False (b) True
- 9.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 10.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
-
11.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<p>I love mangoes.</p> -
12.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high<br>Stars shine</p> -
13.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Birds sing</p> - 14.True or false: <ul> shows bullet points. (a) True (b) False
- 15.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
- 18.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) sends pages over the net (d) turns HTML into a page
- 19.True or false: HTML on its own cannot make a form. (a) True (b) False
- 20.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 21.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 22.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.Which of these is a closing tag? (a) <p> (b) <body> (c) <title> (d) </h1>
- 24.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 25.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
-
26.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Guava</li>
<li>Grapes</li>
</ul> - 27.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
-
28.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="250"> - 29.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
- 30.True or false: in <img>, width is read by screen readers. (a) True (b) False
-
31.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Fun facts</p>
<p>My best friend</p> - 32.Which of these is true of a code editor? (a) hosts websites online (b) is where we type code (c) answers page requests (d) stores a website’s files
-
33.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Cricket is fun.</h2>
<p>Our school trip</p> - 34.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
- 35.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
- 36.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 37.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) hosts websites online
- 38.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </b>
- 39.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
- 40.True or false: a web browser colours code to help us. (a) False (b) True
Answer key
- <!DOCTYPE html>
- Planets
- False
- Maths fun
- 4
- False
- 4
- True
- in the head
- False
- 1
- 5
- 3
- True
- Yes
- Yes
- <h6>
- sends pages over the net
- False
- True
- Yes
- an opening tag
- </h1>
- opens it in a new tab
- <img>
- 5
- </h2>
- 250
- <h5>
- False
- 1
- is where we type code
- 2
- <a>
- -->
- No
- shows line numbers
- </b>
- starts a new line
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids