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.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<em>Fun facts</em>
<h3>The red kite (a) </small> (b) </h3> (c) </p> (d) </em> - 2.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
-
3.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) fort.jpg (b) bus.jpg (c) tiger.jpg (d) Our school bus -
4.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p> - 5.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 6.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h2>? (a) <h4> (b) <h6> (c) <h3> (d) <h2>
- 7.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
- 8.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <ul>
-
9.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 10.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
- 11.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 12.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
-
13.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ol> -
14.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> --> (a) My pets (b) Rain today (c) Good morning! - 15.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
- 16.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
17.🔍 One closing tag is missing. Which one?
<em>My best friend</em>
<p>My pets
<strong>Rain today</strong> (a) </em> (b) </p> (c) </h3> (d) </strong> - 18.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 19.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 20.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) colours code to help us (d) sends pages over the net
- 21.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 22.Which of these is true of a web server? (a) turns HTML into a page (b) answers page requests (c) is where we type code (d) shows line numbers
-
23.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>My pets</p>
<p>I love mangoes.</p> - 24.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) answers page requests (d) opens web pages for us
- 25.True or false: a web browser hosts websites online. (a) True (b) False
-
26.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<h2>Cricket is fun.</h2> - 27.Which of these is true of a web browser? (a) stores a website’s files (b) opens web pages for us (c) sends pages over the net (d) hosts websites online
- 28.Which of these is an empty tag? (a) <input> (b) <title> (c) <h1> (d) <ul>
- 29.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 31.True or false: <a> goes in the head. (a) True (b) False
- 32.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 33.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
34.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing</p> -
35.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) About us (b) quiz.html (c) news.html (d) games.html -
36.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<h4>Good morning!</h4>
<h3>Cricket is fun.</h3> - 37.True or false: <b> has a closing tag. (a) True (b) False
-
38.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<p>Good morning!</p>
<h2>My best friend</h2>
<p>I love mangoes.</p> -
39.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> -
40.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <i>Fun facts</i>
line 3: <em>Good morning! (a) line 2 (b) line 3 (c) line 1
Answer key
- </h3>
- <h1>
- bus.jpg
- 2
- No
- <h6>
- <h1>
- <ul>
- in a new tab
- <h1>
- in the head
- <a>
- 7
- Good morning!
- height
- No
- </p>
- False
- <ul>
- sends pages over the net
- No
- answers page requests
- 4
- answers page requests
- False
- 2
- opens web pages for us
- <input>
- <a href="about.html">
- has a closing tag
- False
- No
- an attribute
- 5
- news.html
- 3
- True
- 3
- 2
- line 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids