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 paragraphs does this code make?
<p>The red kite</p>
<h2>I love mangoes.</h2>
<p>My best friend</p>
<p>Rain today</p>
<h2>My pets</h2>
<p>The red kite</p> -
2.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Cricket is fun.</h3>
<p>Cricket is fun.</p> - 3.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 5.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
-
6.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> --> -
7.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Fun facts</p> - 8.Which of these is an opening tag? (a) </b> (b) </li> (c) <title> (d) </h1>
-
9.🔗 Where does this link open?
<a href="games.html">School news</a> (a) in the same tab (b) in a new tab - 10.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
-
11.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) Art corner (b) about.html (c) href (d) School news -
12.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
13.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) Play games (b) contact.html (c) Take the quiz (d) href - 14.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
- 15.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h4>? (a) <h2> (b) <h6> (c) <h3> (d) <h4>
- 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
- 17.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 18.True or false: <img> goes in the head. (a) True (b) False
-
19.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>My pets</h4>
<p>Cricket is fun.</p> - 20.True or false: <hr> is an empty tag. (a) True (b) False
- 21.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 22.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
-
23.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) maths.html (c) contact.html (d) Visit the site -
24.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) href (b) news.html (c) Maths fun (d) Art corner - 25.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 26.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
- 27.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
- 29.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
-
30.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p> - 31.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) <body> (b) </head>
- 32.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
- 33.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 34.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
-
35.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Orange</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 37.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 38.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
- 39.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) stores a website’s files (d) shows line numbers
-
40.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) cake.jpg (b) map.png (c) A red kite (d) kite.png
Answer key
- 4
- 2
- 6
- has a closing tag
- to leave notes
- 1
- 4
- <title>
- in the same tab
- a code editor
- Art corner
- 4
- Take the quiz
- -->
- <h6>
- <a href="about.html">
- <li>
- False
- 2
- True
- a code editor
- </u>
- contact.html
- Maths fun
- True
- src
- an opening tag
- an attribute
- a web browser
- 2
- </head>
- opens web pages for us
- a code editor
- <h6>
- bullets
- <ol>
- Yes
- starts a new line
- shows line numbers
- kite.png
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids