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 pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> -
2.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog - 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
-
5.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Fun facts</p>
<p>Hello, world!</p> (a) Fun facts (b) I love mangoes. (c) Hello, world! (d) Rain today - 6.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 7.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 8.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep -
10.🔍 One closing tag is missing. Which one?
<small>Our school trip</small>
<h1>My pets</h1>
<h2>I love mangoes. (a) </h1> (b) </h2> (c) </small> (d) </b> -
11.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> --> - 12.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 13.True or false: <li> is an empty tag. (a) True (b) False
- 14.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) saves our .html files (d) turns HTML into a page
- 16.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
- 17.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
- 18.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
19.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Our school trip</h2>
<p>Good morning!</p>
<h3>Cricket is fun.</h3> -
20.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg - 21.True or false: <input> has a closing tag. (a) False (b) True
- 22.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
- 23.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
- 24.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) <strong> (d) </strong>
-
25.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> (a) My best friend (b) I love mangoes. (c) The red kite (d) Our school trip -
26.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> (a) The red kite (b) My best friend (c) Good morning! - 27.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
-
28.🔍 One closing tag is missing. Which one?
<u>I love mangoes.</u>
<h2>Good morning!</h2>
<p>My pets (a) </h1> (b) </p> (c) </h2> (d) </u> - 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
30.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> (a) Hello, world! (b) My best friend (c) Cricket is fun. - 31.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .html (d) .txt
-
32.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) href (c) Maths fun (d) Visit the site -
33.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab -
34.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> --> - 35.Which of these is true of a code editor? (a) saves our .html files (b) answers page requests (c) has an address bar (d) turns HTML into a page
- 36.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
-
37.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My best friend</h2>
<p>My pets</p>
<p>The red kite</p>
<p>My pets</p> -
38.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets -
39.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>My pets</h2>
<h2>Hello, world!</h2>
<p>Good morning!</p>
<h2>Our school trip</h2>
<p>Cricket is fun.</p> -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) cake.jpg (b) A happy dog (c) width (d) Birthday cake
Answer key
- 100
- in a new tab
- Birthday cake
- as one space
- I love mangoes.
- href
- Yes
- No
- A tiger asleep
- </h2>
- 2
- a slash /
- False
- a closing tag
- turns HTML into a page
- Yes
- to describe the image
- has a closing tag
- 3
- bus.jpg
- False
- <h2>
- a line across the page
- </strong>
- The red kite
- My best friend
- <ul>
- </p>
- <ul>
- Cricket is fun.
- .html
- Visit the site
- in the same tab
- 2
- saves our .html files
- a code editor
- 4
- bullets
- 3
- Birthday cake
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids