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 line is missing its closing tag?
line 1: <h2>My pets
line 2: <small>Fun facts</small>
line 3: <p>Rain today</p> (a) line 1 (b) line 3 (c) line 2 -
2.🔍 One closing tag is missing. Which one?
<b>Rain today</b>
<u>My pets
<h2>Fun facts</h2> (a) </h3> (b) </b> (c) </u> (d) </h2> - 3.Which of these is an empty tag? (a) <li> (b) <p> (c) <h1> (d) <hr>
-
4.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> (a) Our school trip (b) Cricket is fun. (c) Fun facts (d) Hello, world! -
5.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> - 6.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
- 7.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 8.True or false: in <img>, src tells which image to load. (a) True (b) False
-
9.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.
<i>My pets</i>
<h2>Good morning!</h2> (a) </i> (b) </h2> (c) </h3> (d) </u> -
10.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> (a) Rain today (b) Fun facts (c) Good morning! - 11.True or false: in <img>, src is read by screen readers. (a) True (b) False
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 13.True or false: in <img>, height names the picture file. (a) False (b) True
- 14.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 15.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h2>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
- 16.Which of these has a closing tag? (a) <br> (b) <meta> (c) <li> (d) <hr>
- 17.Which of these is an opening tag? (a) <h1> (b) </body> (c) </p> (d) </title>
- 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
-
19.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Fun facts</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<h2>Rain today</h2> -
20.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p> (a) Good morning! (b) My best friend (c) My pets (d) Our school trip -
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>My pets</p> -
22.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) Take the quiz (b) School news (c) href (d) https://example.com -
23.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) About us (b) games.html (c) quiz.html (d) about.html - 24.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 25.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
- 26.True or false: <a> goes in the body. (a) False (b) True
-
27.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> -
28.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Fun facts</h2>
<h3>Cricket is fun.</h3>
<h2>Good morning!</h2>
<h2>Cricket is fun.</h2> - 29.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
-
30.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) School news (b) contact.html (c) href (d) Art corner - 31.📄 Can HTML on its own make a form? (a) No (b) Yes
-
32.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) I love mangoes. (c) My best friend (d) Our school trip - 33.True or false: <ol> shows bullet points. (a) True (b) False
- 34.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 35.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
- 36.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h4>
- 37.Which of these is true of a web server? (a) colours code to help us (b) stores a website’s files (c) saves our .html files (d) turns HTML into a page
-
38.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<h4>Cricket is fun.</h4>
<p>Rain today</p> - 39.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
- 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
Answer key
- line 1
- </u>
- <hr>
- Fun facts
- 100
- <h1>
- <ul>
- True
- </h3>
- Good morning!
- False
- bullets
- False
- a closing tag
- <h6>
- <li>
- <h1>
- <h6>
- 3
- My best friend
- 2
- School news
- quiz.html
- in the body
- 1
- True
- 2
- 5
- <h6>
- Art corner
- Yes
- Cricket is fun.
- False
- a code editor
- alt
- <h6>
- stores a website’s files
- 2
- </u>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids