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.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p> - 2.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
- 3.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
4.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png - 5.💬 Does the browser show comments on the page? (a) No (b) Yes
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) A happy dog (b) width (c) dog.jpg (d) The full moon - 7.📄 Can HTML on its own make a form? (a) No (b) Yes
- 8.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
-
9.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 10.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
-
11.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Hello, world!</p>
<h2>Rain today</h2>
<p>Good morning!</p> -
12.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) Maths fun (b) quiz.html (c) news.html (d) art.html -
13.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>Hello, world!</h4>
<h3>Cricket is fun.</h3>
<p>Rain today</p> - 14.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 15.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
- 16.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
- 17.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
- 18.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
-
19.🔗 Which address opens when you click this link?
<a href="https://example.com">Art corner</a> (a) maths.html (b) art.html (c) Art corner (d) https://example.com - 20.True or false: <ul> goes in the head. (a) True (b) False
-
21.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.
line 2: <strong>My best friend</strong>
line 3: <p>I love mangoes.</p> (a) line 3 (b) line 1 (c) line 2 -
22.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Our school trip</p>
<h2>Cricket is fun.</h2>
<h3>Rain today</h3> - 23.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
- 24.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
- 25.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) Hot Tags (d) High Tech
-
26.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<p>My pets</p> -
27.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) news.html (b) quiz.html (c) Maths fun (d) games.html -
28.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <i>Our school trip</i>
line 3: <h1>I love mangoes. (a) line 2 (b) line 3 (c) line 1 -
29.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>My best friend</p> (a) My best friend (b) My pets (c) Good morning! (d) Hello, world! -
30.🔗 Where does this link open?
<a href="art.html">Visit the site</a> (a) in a new tab (b) in the same tab -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) width (b) Our school bus (c) The full moon (d) moon.png -
32.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) contact.html (b) about.html (c) https://example.com (d) Take the quiz - 33.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) has an address bar (d) stores a website’s files
- 34.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 36.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
- 37.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
-
38.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> -
39.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2> - 40.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
Answer key
- 3
- <h6>
- in the head
- tiger.jpg
- No
- A happy dog
- Yes
- <h5>
- in a new tab
- on the browser tab
- 3
- art.html
- 3
- <h6>
- the body
- <!--
- height
- 6
- https://example.com
- False
- line 1
- 3
- <h1>
- a line across the page
- HyperText
- 3
- news.html
- line 3
- Hello, world!
- in the same tab
- The full moon
- about.html
- has an address bar
- True
- opens it in a new tab
- <h1>
- </b>
- 1
- 2
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids