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 address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) https://example.com (d) about.html - 2.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
- 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
- 4.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
-
5.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) kite.png (b) map.png (c) A tiger asleep (d) tiger.jpg - 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 7.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
8.🔍 Which line is missing its closing tag?
line 1: <i>My pets</i>
line 2: <h2>My best friend
line 3: <h3>Cricket is fun.</h3> (a) line 1 (b) line 3 (c) line 2 -
9.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> --> (a) Cricket is fun. (b) Fun facts (c) I love mangoes. (d) Our school trip - 10.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
11.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) games.html (b) news.html (c) School news (d) quiz.html -
12.🔍 One closing tag is missing. Which one?
<h2>Good morning!</h2>
<h1>I love mangoes.
<em>Fun facts</em> (a) </i> (b) </h2> (c) </em> (d) </h1> - 13.True or false: a code editor colours code to help us. (a) True (b) False
- 14.True or false: <ul> is an unordered list. (a) True (b) False
- 15.Which of these is an opening tag? (a) </p> (b) </li> (c) <p> (d) </body>
-
16.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) dog.jpg (b) map.png (c) Map of India (d) cake.jpg - 17.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 18.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
- 19.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) </html> (b) <html>
-
20.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) School news (b) https://example.com (c) Art corner (d) href - 21.True or false: <li> lists things in any order. (a) False (b) True
- 22.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 23.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> - 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 26.True or false: <b> has a closing tag. (a) True (b) False
- 27.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
- 28.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
-
29.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Rivers flow<br>Birds sing</p> - 30.True or false: HTML on its own can count button clicks. (a) False (b) True
- 31.True or false: <h1> goes in the head. (a) False (b) True
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon - 33.Which of these goes in the head? (a) <table> (b) <p> (c) <h1> (d) <style>
- 34.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .png (d) .mp3
- 35.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h1>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
- 36.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) saves our .html files
- 37.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 39.Which of these is true of a web server? (a) hosts websites online (b) saves our .html files (c) opens web pages for us (d) colours code to help us
-
40.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Papaya</li>
</ol> (a) bullets (b) numbers
Answer key
- about.html
- <!--
- as one space
- a web browser
- tiger.jpg
- in the body
- Yes
- line 2
- Fun facts
- an opening tag
- news.html
- </h1>
- True
- True
- <p>
- map.png
- No
- <h5>
- <html>
- Art corner
- False
- False
- No
- 350
- Yes
- True
- <h1>
- a paragraph
- 4
- False
- False
- A happy dog
- <style>
- .html
- <h6>
- saves our .html files
- a closing tag
- <h1>
- hosts websites online
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids