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: HTML on its own cannot show paragraphs. (a) False (b) True
- 2.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a paintbrush (d) a microphone
- 3.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 4.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 5.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
- 6.Which of these is an opening tag? (a) </title> (b) </b> (c) <p> (d) </p>
- 7.True or false: <ul> is one item of a list. (a) False (b) True
- 8.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 9.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
- 10.True or false: a web browser shows line numbers. (a) False (b) True
- 11.True or false: <li> is an unordered list. (a) True (b) False
- 12.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) <html>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite -
14.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> --> -
15.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) Contact us (b) Visit the site (c) href (d) quiz.html - 16.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) Our school bus (b) moon.png (c) The full moon (d) width - 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
19.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<h2>Good morning!</h2>
<p>Fun facts</p>
<h2>Hello, world!</h2> -
20.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p> - 21.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h5>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 22.🔍 Which is the odd one out? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
-
23.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>Our school trip</p> - 24.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
- 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
- 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 27.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <p> (d) <table>
-
28.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>I love mangoes.</h3>
<h4>Rain today</h4>
<p>Our school trip</p> - 29.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
- 30.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
- 31.True or false: <ol> is one item of a list. (a) False (b) True
- 32.True or false: HTML on its own can count button clicks. (a) False (b) True
-
33.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> --> - 34.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
-
36.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>My pets</p> (a) Fun facts (b) Rain today (c) My pets (d) Hello, world! -
37.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab - 38.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 39.True or false: in <img>, width sets how wide it is. (a) False (b) True
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Easy snacks (d) Space Facts
Answer key
- False
- a plain text editor
- -->
- in the head
- <h5>
- <p>
- False
- <h5>
- <h6>
- False
- False
- <!DOCTYPE html>
- A tiger asleep
- 1
- Contact us
- Markup
- The full moon
- in the head
- 2
- 3
- <h5>
- turns HTML into a page
- 3
- 6
- <a href="about.html">
- alt
- <link rel="stylesheet">
- 3
- src
- alt
- False
- False
- 2
- <!--
- <a>
- Fun facts
- in the same tab
- <ul>
- True
- Space Facts
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids