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.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
- 3.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 4.True or false: a code editor shows line numbers. (a) False (b) True
- 5.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
- 6.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
7.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) Art corner (b) quiz.html (c) href (d) Maths fun - 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
-
9.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) map.png (b) kite.png (c) A red kite (d) cake.jpg - 10.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) </h2> (c) <h2/> (d) <\h2>
- 11.📄 Can HTML on its own make headings? (a) Yes (b) No
- 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
13.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<p>Our school trip</p> - 14.True or false: a code editor stores a website’s files. (a) True (b) False
- 15.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
-
16.🔍 Which line is missing its closing tag?
line 1: <u>I love mangoes.
line 2: <h2>The red kite</h2>
line 3: <h1>My best friend</h1> (a) line 3 (b) line 2 (c) line 1 -
17.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> - 18.True or false: <li> has a closing tag. (a) True (b) False
- 19.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) hosts websites online (d) sends pages over the net
-
20.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="200"> (a) tiger.jpg (b) An old fort (c) kite.png (d) fort.jpg - 21.Which of these has a closing tag? (a) <h1> (b) <input> (c) <meta> (d) <br>
- 22.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
- 23.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
- 25.Which of these goes in the head? (a) <img> (b) <ul> (c) <h1> (d) <style>
- 26.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) src (d) width
- 27.🔗 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">
-
28.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>Rain today</p> (a) Rain today (b) Cricket is fun. (c) Good morning! - 29.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
-
30.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) games.html (c) news.html (d) quiz.html -
31.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Sky is blue<br>Roses are red</p> - 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 33.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 34.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
-
35.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<strong>Rain today
<u>Cricket is fun.</u> (a) </strong> (b) </h1> (c) </u> (d) </h3> - 36.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
-
37.📋 What number does the browser show next to “Guava”?
<ol start="4">
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
38.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> (a) My best friend (b) Our school trip (c) My pets (d) Fun facts - 39.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
-
40.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
Answer key
- in the body
- <img>
- <ul>
- True
- <h1>
- in the body
- Maths fun
- False
- kite.png
- </h2>
- Yes
- has a closing tag
- 2
- False
- <h6>
- line 1
- 4
- True
- colours code to help us
- fort.jpg
- <h1>
- False
- a closing tag
- <h1>
- <style>
- width
- <a href="about.html">
- Cricket is fun.
- -->
- news.html
- 4
- <ol>
- a slash /
- a web server
- </strong>
- <ul>
- 5
- Fun facts
- <!--
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids