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.🔍 One closing tag is missing. Which one?
<small>My best friend</small>
<u>Good morning!
<h1>The red kite</h1> (a) </strong> (b) </u> (c) </h1> (d) </small> -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="400"> (a) kite.png (b) Map of India (c) width (d) A red kite -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) width (b) An old fort (c) fort.jpg (d) A tiger asleep - 4.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) </html> (b) <!DOCTYPE html>
- 5.Which of these is true of a code editor? (a) sends pages over the net (b) shows pages from the web (c) stores a website’s files (d) is where we type code
-
6.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Good morning!</h4>
<p>Rain today</p>
<h4>I love mangoes.</h4> -
7.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<b>Our school trip
<h1>My pets</h1> (a) </b> (b) </h1> (c) </h2> (d) </h3> - 8.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
- 9.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) <i> (d) </i>
-
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Roses are red</p> - 11.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
-
12.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
13.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) href (b) quiz.html (c) Contact us (d) Visit the site - 14.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
-
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing</p> - 16.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
-
17.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> -
18.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) Our school trip (c) Cricket is fun. -
19.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> (a) Hello, world! (b) I love mangoes. (c) Our school trip -
20.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Cricket is fun.</h2>
<p>My best friend</p>
<h3>Good morning!</h3> - 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
-
22.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Good morning!</h2>
<p>My best friend</p>
<p>Hello, world!</p>
<h2>The red kite</h2>
<h2>Fun facts</h2> - 23.🔍 Which is the odd one out? (a) sends pages over the net (b) turns HTML into a page (c) hosts websites online (d) stores a website’s files
-
24.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
</ol> -
25.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
- 27.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
-
28.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in a new tab (b) in the same tab - 29.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <hr>
- 30.True or false: <ul> has a closing tag. (a) True (b) False
- 31.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
32.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="350"> (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg - 33.True or false: a web browser shows line numbers. (a) False (b) True
- 34.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
-
35.🔍 One closing tag is missing. Which one?
<b>Our school trip</b>
<h3>Cricket is fun.</h3>
<h2>My pets (a) </i> (b) </h2> (c) </b> (d) </h3> -
36.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>Good morning!</p> -
37.🔍 Which line is missing its closing tag?
line 1: <h2>Rain today</h2>
line 2: <small>Cricket is fun.</small>
line 3: <strong>The red kite (a) line 3 (b) line 2 (c) line 1 -
38.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> -
39.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> - 40.Which of these is an opening tag? (a) <h1> (b) </body> (c) </title> (d) </p>
Answer key
- </u>
- A red kite
- An old fort
- <!DOCTYPE html>
- is where we type code
- 3
- </b>
- structure
- </i>
- 5
- a paragraph
- 4
- Contact us
- <ul>
- 2
- 1
- 3
- Good morning!
- Hello, world!
- 3
- <a href="about.html">
- 3
- turns HTML into a page
- 2
- 10
- <h2>
- <!DOCTYPE html>
- in the same tab
- <hr>
- True
- False
- moon.png
- False
- <
- </h2>
- 4
- line 3
- 250
- 2
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids