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.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<h2>I love mangoes.</h2>
<p>Our school trip</p>
<h2>My best friend</h2> -
2.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> - 3.True or false: <ol> lists steps in order. (a) True (b) False
- 4.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 6.Which of these is an empty tag? (a) <li> (b) <h1> (c) <p> (d) <img>
- 7.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 8.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
9.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
10.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab -
11.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) art.html (b) School news (c) news.html (d) maths.html - 12.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <ul>
- 13.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
14.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) map.png (b) dog.jpg (c) cake.jpg (d) Map of India - 15.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 16.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
17.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> -
18.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) href (b) about.html (c) Art corner (d) School news -
19.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) about.html (b) games.html (c) Visit the site (d) contact.html - 20.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 21.💬 Does the browser show comments on the page? (a) No (b) Yes
- 22.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
- 23.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) is where we type code (d) sends pages over the net
- 24.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <html> (d) <!DOCTYPE html>
- 25.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 26.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
- 27.Which of these is true of a web browser? (a) turns HTML into a page (b) shows line numbers (c) answers page requests (d) is where we type code
- 28.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 29.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 30.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 32.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
-
33.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 34.Which of these is true of a code editor? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) is where we type code
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width -
36.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
</ol> - 37.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 38.True or false: <title> is an empty tag. (a) True (b) False
- 39.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 40.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
Answer key
- 3
- 1
- True
- Yes
- No
- <img>
- a closing tag
- a web browser
- 3
- in the same tab
- maths.html
- <ul>
- True
- map.png
- height
- <h1>
- 2
- Art corner
- games.html
- No
- No
- <a>
- opens web pages for us
- </html>
- <h1>
- <!--
- turns HTML into a page
- a web server
- an attribute
- an opening tag
- numbers
- 1
- numbers
- is where we type code
- Birthday cake
- 3
- <h1>
- False
- <ol>
- <a href="about.html">
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids