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.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 2.True or false: <li> lists steps in order. (a) True (b) False
-
3.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>Fun facts</p>
<p>The red kite</p> (a) Fun facts (b) The red kite (c) Hello, world! (d) Rain today - 4.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
- 5.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
- 6.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
-
7.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>My pets</p> (a) I love mangoes. (b) The red kite (c) My pets - 8.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
- 10.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <head>
- 11.True or false: <ol> lists steps in order. (a) True (b) False
-
12.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> - 13.True or false: a code editor has an address bar. (a) True (b) False
- 14.True or false: <b> has a closing tag. (a) True (b) False
- 15.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 17.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
-
18.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<!-- <p>I love mangoes.</p> --> - 19.True or false: <ul> is an ordered list. (a) False (b) True
-
20.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Rain today</h2>
<p>The red kite</p>
<p>Hello, world!</p> -
21.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>My pets</h3>
<p>Fun facts</p> - 22.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 23.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) HyperText (d) Home Text
- 24.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
25.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Fun facts</p>
<p>I love mangoes.</p> - 26.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) stores a website’s files
-
27.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) games.html (b) about.html (c) Take the quiz (d) quiz.html - 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 29.Which of these is an empty tag? (a) <br> (b) <b> (c) <ul> (d) <p>
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) A happy dog (c) The full moon (d) dog.jpg - 31.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
-
32.🔍 Which line is missing its closing tag?
line 1: <h1>My best friend
line 2: <strong>The red kite</strong>
line 3: <p>I love mangoes.</p> (a) line 1 (b) line 2 (c) line 3 - 33.🔍 Which is the odd one out? (a) has an address bar (b) colours code to help us (c) opens web pages for us (d) shows pages from the web
-
34.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) Art corner (b) School news (c) href (d) about.html - 35.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a microphone (d) a printer
- 36.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
- 37.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 38.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
- 39.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h6>
- 40.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- a closing tag
- False
- Rain today
- <h6>
- <h6>
- element
- I love mangoes.
- an opening tag
- starts a new line
- </html>
- True
- 2
- False
- True
- an opening tag
- the body
- to describe the image
- 1
- False
- 4
- 2
- Yes
- HyperText
- in the body
- 3
- stores a website’s files
- quiz.html
- No
- <br>
- A happy dog
- a slash /
- line 1
- colours code to help us
- Art corner
- a plain text editor
- -->
- <!DOCTYPE html>
- a paragraph
- <h1>
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids