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 paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) width (b) Map of India (c) A red kite (d) kite.png - 3.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
- 4.Which of these is true of a code editor? (a) hosts websites online (b) opens web pages for us (c) is where we type code (d) answers page requests
-
5.🔍 Which line is missing its closing tag?
line 1: <em>My best friend</em>
line 2: <p>The red kite
line 3: <small>Rain today</small> (a) line 2 (b) line 1 (c) line 3 - 6.Which of these is a closing tag? (a) <p> (b) <li> (c) <h1> (d) </body>
- 7.💬 Does the browser show comments on the page? (a) Yes (b) No
-
8.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> -
9.🔍 Which line is missing its closing tag?
line 1: <h3>My pets</h3>
line 2: <em>Rain today</em>
line 3: <i>My best friend (a) line 3 (b) line 1 (c) line 2 -
10.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) games.html (c) quiz.html (d) news.html - 11.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 12.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
- 14.True or false: <p> has a closing tag. (a) False (b) True
- 15.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
16.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) news.html (b) art.html (c) About us (d) maths.html - 17.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) <i> (d) </i>
- 18.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) shows pages from the web
- 19.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
- 20.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 21.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
22.📋 What number does the browser show next to “Banana”?
<ol>
<li>Orange</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 23.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
- 24.Which of these is an opening tag? (a) </p> (b) </h1> (c) </li> (d) <h1>
- 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) is where we type code (d) opens web pages for us
- 27.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
28.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 29.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) shows line numbers
- 30.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
- 31.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 32.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 33.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 34.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) tags (d) pixels
-
35.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) Take the quiz (c) games.html (d) School news -
36.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
37.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Fun facts</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> (a) Hello, world! (b) My pets (c) Fun facts (d) My best friend - 38.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 39.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 40.True or false: <li> is an empty tag. (a) True (b) False
Answer key
- 2
- A red kite
- starts a new line
- is where we type code
- line 2
- </body>
- No
- 3
- line 3
- news.html
- <ul>
- a closing tag
- <!DOCTYPE html>
- True
- <ul>
- maths.html
- </i>
- saves our .html files
- to describe the image
- <html>
- False
- 2
- <h6>
- <h1>
- No
- is where we type code
- No
- in a new tab
- opens web pages for us
- element
- Yes
- False
- an opening tag
- tags
- School news
- 200
- My pets
- has a closing tag
- <li>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids