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.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 2.True or false: <ul> lists steps in order. (a) False (b) True
- 3.Which of these is true of a code editor? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) is where we type code
- 4.Which of these is an opening tag? (a) </h1> (b) </body> (c) </p> (d) <h1>
- 5.Which of these has a closing tag? (a) <input> (b) <img> (c) <h1> (d) <br>
-
6.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>My best friend</p> (a) My best friend (b) Hello, world! (c) Cricket is fun. (d) Fun facts - 7.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
-
8.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 9.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
- 10.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
- 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
12.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Fun facts</p> - 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
14.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png -
15.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> - 16.📄 Can HTML on its own make headings? (a) Yes (b) No
- 17.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
- 18.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 19.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 20.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the head (d) the title
- 21.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
22.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <p>Hello, world!</p>
line 3: <h1>Our school trip</h1> (a) line 1 (b) line 3 (c) line 2 - 23.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
- 24.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) </body> (d) <html>
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
-
26.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> --> - 27.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
- 28.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
- 29.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
-
30.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>The red kite</p> -
31.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) School news (c) quiz.html (d) about.html -
32.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg -
33.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<i>Our school trip
<strong>The red kite</strong> (a) </h3> (b) </strong> (c) </h2> (d) </i> - 34.True or false: <a> goes in the body. (a) True (b) False
-
35.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 36.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 37.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
- 38.True or false: <img> has a closing tag. (a) False (b) True
- 39.True or false: <li> lists things in any order. (a) True (b) False
-
40.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) map.png (b) tiger.jpg (c) kite.png (d) A tiger asleep
Answer key
- a closing tag
- False
- is where we type code
- <h1>
- <h1>
- Hello, world!
- an attribute
- 1
- <h6>
- <h1>
- <ol>
- 2
- No
- map.png
- 2
- Yes
- <h3>
- Yes
- in the head
- the body
- a closing tag
- line 1
- <h2>
- <!DOCTYPE html>
- <h6>
- 1
- </i>
- a paragraph
- <h1>
- 2
- quiz.html
- dog.jpg
- </i>
- True
- bullets
- Yes
- alt
- False
- False
- tiger.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids