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 words do you click on?
<a href="contact.html">Maths fun</a> (a) href (b) Art corner (c) Maths fun (d) contact.html - 2.True or false: a web browser shows pages from the web. (a) False (b) True
- 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
- 4.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 5.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
- 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
7.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) href (b) games.html (c) School news (d) Art corner - 8.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
-
9.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!</b>
line 2: <h3>Our school trip
line 3: <strong>Cricket is fun.</strong> (a) line 1 (b) line 3 (c) line 2 - 10.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) pixels (d) tags
-
11.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) href (b) Play games (c) quiz.html (d) About us - 12.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 13.🔍 Which is the odd one out? (a) shows line numbers (b) answers page requests (c) hosts websites online (d) sends pages over the net
-
14.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<small>Good morning!</small>
<b>Cricket is fun. (a) </b> (b) </p> (c) </small> (d) </h1> - 15.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
-
16.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
</ul> - 17.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 18.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
19.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in a new tab (b) in the same tab - 20.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 21.True or false: <title> is an empty tag. (a) True (b) False
- 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 23.True or false: in <img>, alt describes the picture. (a) True (b) False
- 24.True or false: <ul> goes in the head. (a) True (b) False
-
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) cake.jpg (b) kite.png (c) map.png (d) A red kite - 26.True or false: <li> lists steps in order. (a) False (b) True
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Cricket is fun.</p>
<h3>Our school trip</h3> - 28.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1> (c) <h1/> (d) </h1>
-
29.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.</small>
<strong>I love mangoes.
<p>Rain today</p> (a) </strong> (b) </h3> (c) </small> (d) </p> - 30.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 31.Which of these is an empty tag? (a) <title> (b) <h1> (c) <br> (d) <li>
- 32.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
- 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
- 34.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
-
35.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> - 36.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 37.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
38.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Fun facts</h2>
<h2>Rain today</h2>
<p>Good morning!</p>
<p>The red kite</p> -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) width (b) The full moon (c) Our school bus (d) moon.png - 40.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <title>
Answer key
- Maths fun
- True
- <img>
- No
- alt
- href
- Art corner
- <a>
- line 2
- tags
- Play games
- a web browser
- shows line numbers
- </b>
- alt
- 6
- <ol>
- in the body
- in the same tab
- Yes
- False
- in the head
- True
- False
- kite.png
- False
- 2
- </h1>
- </strong>
- <ul>
- <br>
- 6
- as one space
- <h5>
- 1
- No
- has a closing tag
- 3
- The full moon
- <title>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids