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.True or false: a web browser shows pages from the web. (a) False (b) True
- 2.Which of these goes in the head? (a) <h1> (b) <a> (c) <meta charset="utf-8"> (d) <p>
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width -
4.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
<li>Orange</li>
<li>Grapes</li>
</ul> - 5.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
6.🔍 One closing tag is missing. Which one?
<h1>Rain today</h1>
<h3>My best friend</h3>
<strong>Fun facts (a) </strong> (b) </h3> (c) </h1> (d) </i> - 7.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
- 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
- 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 10.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
- 11.Which of these has a closing tag? (a) <hr> (b) <h1> (c) <br> (d) <img>
- 12.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) hosts websites online (d) stores a website’s files
- 13.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 14.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
15.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) Play games (b) maths.html (c) art.html (d) news.html -
16.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) Contact us (b) contact.html (c) https://example.com (d) maths.html -
17.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 18.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 19.Which of these has a closing tag? (a) <hr> (b) <img> (c) <input> (d) <title>
-
20.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) https://example.com (b) Play games (c) maths.html (d) art.html - 21.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
-
22.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Good morning!</p> (a) Rain today (b) Our school trip (c) Good morning! - 23.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
25.🔍 One closing tag is missing. Which one?
<i>Rain today</i>
<h1>Cricket is fun.
<strong>Fun facts</strong> (a) </strong> (b) </h1> (c) </u> (d) </i> -
26.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) href (b) news.html (c) Contact us (d) About us - 27.True or false: <a> goes in the body. (a) False (b) True
- 28.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 29.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
- 30.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 31.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound
-
32.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) kite.png (b) A red kite (c) cake.jpg (d) map.png -
33.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>My best friend</p> - 34.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
35.🔍 Which line is missing its closing tag?
line 1: <small>My pets
line 2: <h2>Good morning!</h2>
line 3: <h1>My best friend</h1> (a) line 2 (b) line 1 (c) line 3 -
36.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) art.html (b) Play games (c) Take the quiz (d) href - 37.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
- 38.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
-
39.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 40.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
Answer key
- True
- <meta charset="utf-8">
- An old fort
- 6
- href
- </strong>
- </h1>
- tags
- in the head
- <h1>
- <h1>
- opens web pages for us
- Yes
- in the head
- maths.html
- contact.html
- 2
- a code editor
- <title>
- https://example.com
- <h6>
- Rain today
- <a>
- bullets
- </h1>
- About us
- True
- a code editor
- <h6>
- in the body
- structure
- kite.png
- 3
- opens it in a new tab
- line 1
- Take the quiz
- <
- <!--
- 3
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids