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: a web browser shows line numbers. (a) True (b) False
- 2.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .png (d) .mp3
-
3.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p> (a) Good morning! (b) I love mangoes. (c) My best friend -
4.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Kites fly high<br>Sky is blue<br>Rivers flow</p> -
5.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> (a) The red kite (b) My best friend (c) Rain today - 6.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) colours code to help us
- 7.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
8.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) Take the quiz (b) href (c) School news (d) about.html - 9.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
-
10.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Stars shine<br>Birds sing</p> - 11.True or false: HTML on its own can make tables. (a) True (b) False
- 12.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
- 13.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
- 14.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
-
15.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
16.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Contact us (b) href (c) Visit the site (d) contact.html - 17.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
19.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) about.html (b) contact.html (c) Maths fun (d) games.html - 20.True or false: a web browser opens web pages for us. (a) False (b) True
-
21.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
22.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> (a) I love mangoes. (b) Our school trip (c) Cricket is fun. -
23.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> --> -
24.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> (a) I love mangoes. (b) Cricket is fun. (c) Our school trip -
25.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> -
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Space Facts (c) Thanks for visiting. (d) Planets - 27.True or false: <li> goes inside ul or ol. (a) True (b) False
-
28.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>My pets</p> -
29.🔍 One closing tag is missing. Which one?
<p>My best friend</p>
<h2>Cricket is fun.
<small>My pets</small> (a) </u> (b) </h2> (c) </p> (d) </small> -
30.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Hello, world!</p>
<p>Hello, world!</p>
<h2>Fun facts</h2> - 31.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 32.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
33.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Rain today</p> --> - 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 35.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
- 36.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
-
37.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Welcome! (b) Mars is red. (c) index.html (d) Art Gallery - 38.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
- 39.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
-
40.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<small>My pets (a) </small> (b) </p> (c) </h1> (d) </h3>
Answer key
- False
- .html
- My best friend
- 5
- Rain today
- colours code to help us
- Yes
- School news
- <!--
- 4
- True
- </u>
- alt
- 1
- in a new tab
- Contact us
- True
- <ol>
- games.html
- True
- 3
- I love mangoes.
- 1
- Cricket is fun.
- 3
- Planets
- True
- 2
- </h2>
- 3
- True
- in the body
- 1
- <a href="about.html">
- <a>
- src
- Art Gallery
- width
- </h1>
- </small>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids