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 one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
3.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 4.True or false: <li> is an empty tag. (a) False (b) True
- 5.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 6.Which of these is a closing tag? (a) <b> (b) <title> (c) </b> (d) <body>
- 7.True or false: <input> is an empty tag. (a) False (b) True
-
8.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>My best friend</p> - 9.Which of these is an opening tag? (a) <p> (b) </p> (c) </h1> (d) </li>
-
10.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) Art corner (b) contact.html (c) maths.html (d) https://example.com -
11.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>My pets</p> - 12.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 13.True or false: <li> lists things in any order. (a) False (b) True
-
14.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!
line 2: <em>Our school trip</em>
line 3: <i>My pets</i> (a) line 2 (b) line 3 (c) line 1 - 15.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
-
16.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Kites fly high</p> -
17.📋 What number does the browser show next to “Orange”?
<ol start="6">
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 18.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) turns HTML into a page (d) has an address bar
- 19.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
- 20.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h4>
-
21.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<u>My pets</u>
<p>Hello, world! (a) </u> (b) </i> (c) </p> (d) </h3> - 22.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
23.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> - 24.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
- 26.Which of these is an empty tag? (a) <h1> (b) <br> (c) <b> (d) <title>
- 27.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
- 28.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
29.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) news.html (b) quiz.html (c) art.html (d) School news -
30.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) https://example.com (c) maths.html (d) art.html -
31.🔍 One closing tag is missing. Which one?
<h2>The red kite</h2>
<u>Cricket is fun.</u>
<small>My pets (a) </u> (b) </h2> (c) </em> (d) </small> - 32.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
-
33.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>The red kite</p> (a) Cricket is fun. (b) My best friend (c) Good morning! (d) The red kite - 34.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) width (d) height
-
35.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Kites fly high<br>Stars shine</p> -
36.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Mango</li>
</ul> - 37.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) sends pages over the net (d) saves our .html files
-
38.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> - 39.True or false: <h1> has a closing tag. (a) False (b) True
-
40.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) Art corner (b) https://example.com (c) contact.html (d) about.html
Answer key
- a web browser
- Yes
- in a new tab
- False
- has a closing tag
- </b>
- True
- 2
- <p>
- contact.html
- 1
- True
- False
- line 1
- a paragraph
- 3
- 7
- is where we type code
- <h4>
- <h3>
- </p>
- an opening tag
- 2
- <h5>
- <h5>
- <br>
- element
- in the head
- art.html
- https://example.com
- </small>
- <head>
- Good morning!
- alt
- 4
- 3
- saves our .html files
- 2
- True
- about.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids