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="about.html">Play games</a> (a) href (b) Play games (c) About us (d) about.html -
2.🔍 One closing tag is missing. Which one?
<u>Hello, world!
<b>The red kite</b>
<em>My pets</em> (a) </u> (b) </em> (c) </i> (d) </b> - 3.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) has an address bar (d) saves our .html files
- 4.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
-
5.🔍 One closing tag is missing. Which one?
<h3>Good morning!
<h2>The red kite</h2>
<strong>My best friend</strong> (a) </strong> (b) </em> (c) </h2> (d) </h3> - 6.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
-
8.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg -
9.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!
line 2: <strong>My best friend</strong>
line 3: <h2>Rain today</h2> (a) line 3 (b) line 1 (c) line 2 - 10.Which of these goes in the head? (a) <table> (b) <a> (c) <ul> (d) <title>
- 11.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
- 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 14.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a music player (d) a web browser
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) bus.jpg (b) An old fort (c) Our school bus (d) width - 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 17.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) saves our .html files (d) turns HTML into a page
- 18.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) is where we type code (d) stores a website’s files
-
19.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
20.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Fun facts</h2>
<p>My pets</p> - 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
-
22.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My pets</p> - 23.True or false: <b> is an empty tag. (a) False (b) True
- 24.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 25.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
-
26.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Cricket is fun.</p>
<h3>Cricket is fun.</h3>
<p>Good morning!</p> - 27.Which of these goes in the head? (a) <h1> (b) <img> (c) <a> (d) <style>
-
28.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) href (b) Maths fun (c) art.html (d) Visit the site - 29.True or false: a web server shows pages from the web. (a) False (b) True
- 30.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
- 31.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
- 32.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </html> (b) </body>
- 33.Which of these goes in the head? (a) <table> (b) <ul> (c) <a> (d) <meta charset="utf-8">
- 34.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
35.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>The red kite</p> - 36.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
-
37.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) quiz.html (b) Visit the site (c) href (d) Maths fun -
38.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<strong>Cricket is fun.</strong>
<h3>My pets (a) </h3> (b) </h2> (c) </h1> (d) </strong> -
39.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Our school trip</p>
<h3>Fun facts</h3> -
40.🔍 One closing tag is missing. Which one?
<u>Cricket is fun.</u>
<b>I love mangoes.
<small>Hello, world!</small> (a) </small> (b) </p> (c) </b> (d) </u>
Answer key
- Play games
- </u>
- has an address bar
- 6
- </h3>
- an opening tag
- src
- dog.jpg
- line 1
- <title>
- href
- <h6>
- Yes
- a web browser
- Our school bus
- a slash /
- saves our .html files
- is where we type code
- 3
- 2
- alt
- 3
- False
- a code editor
- 1
- 2
- <style>
- Visit the site
- False
- <!--
- the body
- </body>
- <meta charset="utf-8">
- a closing tag
- 4
- <li>
- Visit the site
- </h3>
- 2
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids