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 text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>My pets</p> (a) Hello, world! (b) I love mangoes. (c) My pets - 2.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
- 3.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 5.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>
-
6.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) Visit the site (b) quiz.html (c) about.html (d) games.html -
7.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Guava</li>
</ol> -
8.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Fun facts</p> - 9.📄 Can HTML on its own make headings? (a) No (b) Yes
- 10.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .html (d) .txt
-
12.📋 What number does the browser show next to “Orange”?
<ol start="6">
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
</ol> - 13.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 14.📄 Can HTML on its own make a form? (a) No (b) Yes
- 15.Which of these is true of a web server? (a) stores a website’s files (b) turns HTML into a page (c) shows pages from the web (d) saves our .html files
- 16.Which of these is a closing tag? (a) <title> (b) <li> (c) <b> (d) </li>
- 17.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
18.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) Good morning! (b) I love mangoes. (c) My pets -
19.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Roses are red<br>Sky is blue<br>Rivers flow</p> -
20.📋 What number does the browser show next to “Mango”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
21.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>My best friend</h2>
<h3>Fun facts</h3> -
22.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="200"> - 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 24.True or false: in <img>, src names the picture file. (a) True (b) False
- 25.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 26.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
-
27.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Our school trip</p> - 28.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </body> (c) </html> (d) <html>
- 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
- 30.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
- 31.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) has an address bar (d) turns HTML into a page
- 32.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
-
33.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<p>The red kite</p> - 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
-
35.🔍 Which line is missing its closing tag?
line 1: <strong>My pets</strong>
line 2: <h3>My best friend
line 3: <i>Our school trip</i> (a) line 1 (b) line 3 (c) line 2 -
36.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> - 37.Which of these goes in the body? (a) <p> (b) <link rel="stylesheet"> (c) <style> (d) <title>
- 38.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
39.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) art.html -
40.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Birds sing<br>Rivers flow</p>
Answer key
- I love mangoes.
- alt
- Yes
- has a closing tag
- <h1>
- quiz.html
- 2
- 4
- Yes
- a closing tag
- .html
- 7
- in the head
- Yes
- stores a website’s files
- </li>
- has a closing tag
- Good morning!
- 5
- 3
- 3
- 200
- -->
- True
- src
- <h6>
- 1
- </html>
- <ul>
- a code editor
- is where we type code
- element
- 1
- <h1>
- line 2
- 3
- <p>
- Yes
- Contact us
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids