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 attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
-
2.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p> (a) My pets (b) Rain today (c) Fun facts -
3.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>My pets</p> (a) Good morning! (b) My pets (c) My best friend -
4.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today</h3>
line 2: <p>Hello, world!
line 3: <h2>I love mangoes.</h2> (a) line 1 (b) line 2 (c) line 3 -
5.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 6.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
-
7.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> - 8.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
- 9.📄 Can HTML on its own make headings? (a) No (b) Yes
- 10.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
-
11.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 13.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
- 14.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
15.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Hello, world!</h2>
<p>My best friend</p>
<p>My best friend</p> - 16.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
-
17.🔗 Where does this link open?
<a href="https://example.com">Contact us</a> (a) in a new tab (b) in the same tab -
18.🔗 Where does this link open?
<a href="art.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing</p> - 20.True or false: a web server sends pages over the net. (a) False (b) True
- 21.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
-
22.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> (a) The red kite (b) Cricket is fun. (c) Hello, world! - 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
-
24.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> (a) My pets (b) Our school trip (c) I love mangoes. (d) Hello, world! -
25.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) quiz.html (b) news.html (c) games.html (d) Take the quiz - 26.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
- 27.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
- 28.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
-
29.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> - 30.True or false: a web server colours code to help us. (a) False (b) True
- 31.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 32.🌍 Which program shows a web page to us? (a) a music player (b) a calculator (c) a paint program (d) a web browser
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
-
34.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>The red kite</p>
<p>Hello, world!</p> - 35.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
- 36.Which of these is an opening tag? (a) <title> (b) </title> (c) </p> (d) </h1>
- 37.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
- 38.💬 Does the browser show comments on the page? (a) No (b) Yes
- 39.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
- 40.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
Answer key
- src
- Rain today
- Good morning!
- line 2
- bullets
- <h4>
- 1
- a paragraph
- Yes
- HyperText
- in a new tab
- in the head
- <h1>
- has a closing tag
- 3
- <h1>
- in the same tab
- in a new tab
- 4
- True
- <h1>
- Cricket is fun.
- height
- Our school trip
- news.html
- Language
- </h1>
- <h1>
- 2
- False
- a closing tag
- a web browser
- <h2>
- 3
- <!DOCTYPE html>
- <title>
- <h2>
- No
- 6
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids