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.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) turns HTML into a page (d) sends pages over the net
- 2.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
- 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
-
4.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) href (b) School news (c) https://example.com (d) Take the quiz -
5.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) Art corner (c) href (d) https://example.com - 6.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) shows pages from the web (d) is where we type code
- 7.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 9.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
- 10.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) </i> (d) <i>
-
11.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Cricket is fun.</p> - 12.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
- 13.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
- 14.🏷️ HTML marks up text using ___. (a) keys (b) tags (c) wires (d) pixels
-
15.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg -
16.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> -
17.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> --> - 18.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) Map of India (c) map.png (d) width - 20.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
21.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in the same tab (b) in a new tab -
22.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Roses are red<br>Sky is blue</p> -
23.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>Our school trip</p> (a) Our school trip (b) Fun facts (c) I love mangoes. (d) The red kite - 24.Which of these goes in the body? (a) <img> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
- 25.🌍 Which program shows a web page to us? (a) a calculator (b) a web browser (c) a paint program (d) a music player
-
26.🔍 One closing tag is missing. Which one?
<b>Rain today</b>
<h3>Our school trip</h3>
<h1>Fun facts (a) </h3> (b) </small> (c) </b> (d) </h1> - 27.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
- 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
-
29.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets - 30.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
-
31.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) contact.html (b) about.html (c) https://example.com (d) Maths fun - 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 33.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
-
34.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) My best friend (b) Good morning! (c) My pets (d) Hello, world! - 35.True or false: in <img>, height tells which image to load. (a) True (b) False
- 36.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
-
37.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<h2>My pets</h2>
<p>Good morning!</p> -
38.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2>
<p>My pets</p> -
39.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Good morning!</p>
<p>The red kite</p> (a) The red kite (b) My best friend (c) Rain today (d) Good morning! - 40.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
Answer key
- turns HTML into a page
- <h6>
- opens it in a new tab
- School news
- Maths fun
- is where we type code
- a slash /
- Yes
- to leave notes
- </i>
- 3
- <h6>
- <h2>
- tags
- bus.jpg
- 350
- 1
- <ul>
- Map of India
- No
- in the same tab
- 4
- The red kite
- <img>
- a web browser
- </h1>
- a code editor
- </u>
- numbers
- to describe the image
- about.html
- Yes
- a web server
- My pets
- False
- <h6>
- 3
- 3
- Rain today
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids