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.📄 Can HTML on its own make tables? (a) No (b) Yes
- 2.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) sends pages over the net
- 3.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <img> (d) <hr>
- 4.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 5.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
- 6.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
- 7.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h3>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
- 8.True or false: <li> is an ordered list. (a) True (b) False
-
9.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Grapes</li>
</ol> -
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Kites fly high</p> -
11.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) About us (b) Play games (c) href (d) maths.html -
12.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg -
13.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Cricket is fun.</h2>
<h2>My best friend</h2>
<h2>Cricket is fun.</h2>
<p>Our school trip</p>
<h2>My best friend</h2> - 14.🔗 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
- 15.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) stores a website’s files
- 16.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 17.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
-
18.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
19.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> - 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
- 21.True or false: in <img>, src describes the picture. (a) False (b) True
- 22.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
-
23.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg -
24.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> - 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
-
27.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.</i>
line 2: <small>My pets
line 3: <h1>Hello, world!</h1> (a) line 1 (b) line 2 (c) line 3 - 28.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
- 29.Which of these goes in the head? (a) <p> (b) <img> (c) <meta charset="utf-8"> (d) <a>
-
30.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) about.html (c) contact.html (d) Take the quiz - 31.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
-
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="150"> (a) Our school bus (b) width (c) moon.png (d) The full moon -
34.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in a new tab (b) in the same tab - 35.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
36.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) art.html (b) Contact us (c) href (d) About us -
37.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) Contact us (b) href (c) About us (d) games.html -
38.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) Visit the site (b) about.html (c) games.html (d) quiz.html - 39.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) src (d) width
- 40.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) </body>
Answer key
- Yes
- sends pages over the net
- <h1>
- Yes
- </p>
- <h5>
- <h3>
- False
- 3
- 3
- Play games
- dog.jpg
- 2
- opens it in a new tab
- stores a website’s files
- Yes
- <a>
- numbers
- 3
- as one space
- False
- <!--
- tiger.jpg
- 4
- <a href="about.html">
- <h3>
- line 2
- <h1>
- <meta charset="utf-8">
- about.html
- to describe the image
- <
- The full moon
- in the same tab
- Yes
- About us
- About us
- quiz.html
- alt
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids