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 address opens when you click this link?
<a href="news.html">About us</a> (a) news.html (b) About us (c) games.html (d) quiz.html - 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
- 3.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) saves our .html files
- 4.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
- 5.Which of these has a closing tag? (a) <b> (b) <img> (c) <meta> (d) <hr>
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) cake.jpg (c) A happy dog (d) Birthday cake - 7.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
-
8.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> - 9.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
10.📋 What number does the browser show next to “Orange”?
<ol start="4">
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
</ol> - 11.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
- 12.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 13.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
- 15.True or false: a web browser shows line numbers. (a) True (b) False
-
16.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) maths.html (b) art.html (c) Play games (d) https://example.com - 17.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 18.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
- 19.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) is where we type code (d) shows line numbers
- 20.True or false: in <img>, src tells which image to load. (a) True (b) False
-
21.🖼️ 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 - 22.True or false: <ul> is an ordered list. (a) True (b) False
- 23.Which of these is true of a code editor? (a) answers page requests (b) is where we type code (c) turns HTML into a page (d) shows pages from the web
- 24.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 25.True or false: a web server answers page requests. (a) True (b) False
- 26.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
- 27.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
28.🔍 One closing tag is missing. Which one?
<em>Cricket is fun.
<u>Hello, world!</u>
<p>My pets</p> (a) </em> (b) </h2> (c) </u> (d) </p> - 29.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
-
30.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers - 31.💬 Does the browser show comments on the page? (a) No (b) Yes
- 32.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
- 33.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </head> (c) </html> (d) <!DOCTYPE html>
-
34.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Stars shine</p> -
35.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Maths fun (b) Art corner (c) about.html (d) href -
36.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>I love mangoes.</p>
<h2>Good morning!</h2> -
37.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Good morning!</p>
<p>Our school trip</p> - 38.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
39.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.</h1>
<strong>The red kite
<u>Rain today</u> (a) </h1> (b) </p> (c) </u> (d) </strong> - 40.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
Answer key
- news.html
- src
- turns HTML into a page
- <h1>
- <b>
- Birthday cake
- starts a new line
- 2
- True
- 6
- <h6>
- a web server
- href
- <h2>
- False
- https://example.com
- False
- a plain text editor
- shows pages from the web
- True
- A tiger asleep
- False
- is where we type code
- <h5>
- True
- </p>
- No
- </em>
- alt
- bullets
- No
- <h6>
- <!DOCTYPE html>
- 3
- Maths fun
- 2
- 1
- in the head
- </strong>
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids