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 does <br> do? (a) starts a new line (b) makes a list (c) adds a picture (d) makes text bold
- 2.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 3.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
- 4.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) <html> (d) </html>
- 5.Which of these is true of a code editor? (a) opens web pages for us (b) stores a website’s files (c) shows line numbers (d) hosts websites online
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) A happy dog (b) width (c) Birthday cake (d) cake.jpg -
7.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) contact.html (b) href (c) Maths fun (d) Art corner -
8.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> - 9.True or false: <img> has a closing tag. (a) False (b) True
- 10.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) colours code to help us (d) opens web pages for us
-
11.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Our school trip</p>
<h3>My pets</h3>
<p>Our school trip</p>
<p>My pets</p> - 12.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 13.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
- 14.True or false: <ol> is one item of a list. (a) True (b) False
- 15.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
- 16.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 17.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
- 18.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) shows pages from the web
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) moon.png (b) width (c) The full moon (d) Our school bus -
20.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<p>Rain today</p> - 21.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) <body> (b) </head>
- 22.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
- 23.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) answers page requests (d) has an address bar
- 24.True or false: <img> goes in the head. (a) True (b) False
-
25.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Good morning!</h3>
<p>Our school trip</p> - 26.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) sends pages over the net
- 27.True or false: <title> has a closing tag. (a) False (b) True
- 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 29.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 30.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
- 31.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 32.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
-
34.🔍 One closing tag is missing. Which one?
<i>Good morning!</i>
<h2>Hello, world!
<h3>Cricket is fun.</h3> (a) </b> (b) </h3> (c) </i> (d) </h2> -
35.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
</ul> - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
-
37.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) Maths fun (b) news.html (c) art.html (d) maths.html -
38.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) cake.jpg (b) kite.png (c) map.png (d) A red kite -
39.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) Good morning! (b) Our school trip (c) The red kite (d) My pets - 40.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
Answer key
- starts a new line
- a closing tag
- <h5>
- </html>
- shows line numbers
- Birthday cake
- Maths fun
- 2
- False
- opens web pages for us
- 2
- has a closing tag
- <
- False
- <h1>
- <a>
- <h6>
- hosts websites online
- The full moon
- 4
- </head>
- opens it in a new tab
- answers page requests
- False
- 2
- sends pages over the net
- True
- <h6>
- False
- </p>
- Yes
- 1
- <li>
- </h2>
- 5
- <h1>
- maths.html
- kite.png
- Our school trip
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids