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.True or false: <li> has a closing tag. (a) True (b) False
- 2.True or false: a web browser answers page requests. (a) True (b) False
- 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
- 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 5.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h5>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
- 7.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
8.🔗 Which address opens when you click this link?
<a href="https://example.com">Art corner</a> (a) maths.html (b) Art corner (c) https://example.com (d) art.html -
9.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My pets</p>
<h4>Hello, world!</h4> -
10.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Rain today</p>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<h2>Rain today</h2>
<p>Hello, world!</p> -
11.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Our school trip</h2>
<h2>My pets</h2> -
12.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) contact.html (b) games.html (c) about.html (d) Take the quiz -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 14.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
- 15.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<h2>My pets</h2> - 17.Which of these is true of a web server? (a) colours code to help us (b) has an address bar (c) opens web pages for us (d) answers page requests
- 18.📄 Can HTML on its own make headings? (a) Yes (b) No
- 19.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 20.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) sends pages over the net (d) shows line numbers
- 21.True or false: a web server turns HTML into a page. (a) True (b) False
- 22.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
- 23.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 24.Which of these has a closing tag? (a) <title> (b) <hr> (c) <meta> (d) <br>
- 25.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
- 27.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
-
29.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> --> - 30.Which of these is true of a web browser? (a) hosts websites online (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
-
31.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Birds sing</p> - 32.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <title> (d) <style>
-
34.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) The red kite (c) Good morning! (d) I love mangoes. - 35.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <a>
-
36.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in a new tab (b) in the same tab - 37.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
- 38.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
- 39.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
- 40.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
Answer key
- True
- False
- width
- Yes
- in the body
- <h6>
- No
- https://example.com
- 2
- 4
- 3
- games.html
- A tiger asleep
- a slash /
- False
- 2
- answers page requests
- Yes
- <ol>
- sends pages over the net
- False
- <li>
- href
- <title>
- an opening tag
- <h6>
- a closing tag
- <h3>
- 2
- turns HTML into a page
- 3
- a web browser
- <p>
- Good morning!
- <a>
- in the same tab
- src
- to leave notes
- <h6>
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids