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.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Stars shine</p> -
2.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!
line 2: <em>Cricket is fun.</em>
line 3: <h2>Our school trip</h2> (a) line 1 (b) line 3 (c) line 2 -
3.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 4.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) colours code to help us
- 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
-
6.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> -
7.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Cricket is fun.</h2>
<h3>I love mangoes.</h3>
<h2>Cricket is fun.</h2>
<p>I love mangoes.</p> -
8.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) href (b) Take the quiz (c) art.html (d) Play games - 9.True or false: HTML on its own can make links to pages. (a) False (b) True
- 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
- 11.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
- 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
-
13.🔍 One closing tag is missing. Which one?
<em>I love mangoes.
<small>Our school trip</small>
<strong>Rain today</strong> (a) </small> (b) </i> (c) </em> (d) </strong> - 14.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
- 15.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
-
16.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<h2>Cricket is fun.</h2> - 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 18.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
-
19.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> - 20.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) has an address bar (d) sends pages over the net
- 21.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 22.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
-
23.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) School news (b) https://example.com (c) Take the quiz (d) href - 24.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) sends pages over the net (d) saves our .html files
- 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
26.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Fun facts</p>
<p>Our school trip</p> - 27.True or false: HTML on its own cannot make headings. (a) False (b) True
- 28.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <table> (d) <h1>
- 29.True or false: <title> is an empty tag. (a) False (b) True
- 30.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a calculator (d) a music player
- 31.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 32.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 33.True or false: a code editor opens web pages for us. (a) True (b) False
-
34.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Our school trip</p>
<h2>My pets</h2>
<h2>Our school trip</h2>
<h2>Good morning!</h2> - 35.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 36.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
- 39.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 40.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- 3
- line 1
- bullets
- colours code to help us
- <h4>
- 3
- 4
- Take the quiz
- True
- as one space
- the body
- <!DOCTYPE html>
- </em>
- <img>
- <a href="about.html">
- 1
- Yes
- <h6>
- 300
- sends pages over the net
- a closing tag
- element
- School news
- sends pages over the net
- Yes
- 3
- False
- <meta charset="utf-8">
- False
- a web browser
- an opening tag
- in the body
- False
- 2
- <ul>
- an attribute
- 50
- <!--
- in the head
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids