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 shows pages from the web? (a) a web server (b) a code editor (c) a web browser
-
2.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets -
3.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p> (a) My best friend (b) Hello, world! (c) Rain today (d) Fun facts -
4.📋 What number does the browser show next to “Guava”?
<ol start="8">
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 5.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
- 6.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
-
7.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png - 8.True or false: <style> goes in the body. (a) False (b) True
- 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 10.True or false: <input> has a closing tag. (a) True (b) False
- 11.True or false: in <img>, width tells which image to load. (a) True (b) False
-
12.🔍 One closing tag is missing. Which one?
<p>Cricket is fun.</p>
<u>My best friend
<em>The red kite</em> (a) </p> (b) </u> (c) </em> (d) </h3> - 13.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
- 14.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
- 15.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <title> (d) <link rel="stylesheet">
-
16.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) I love mangoes. (b) Hello, world! (c) The red kite (d) Rain today -
17.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.
line 2: <u>Hello, world!</u>
line 3: <i>My pets</i> (a) line 2 (b) line 3 (c) line 1 - 18.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
-
19.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) My pets (b) Good morning! (c) Rain today - 20.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 21.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) is where we type code (d) saves our .html files
- 22.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
- 23.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
- 24.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
-
25.🔍 One closing tag is missing. Which one?
<strong>Our school trip</strong>
<h3>My pets</h3>
<em>I love mangoes. (a) </em> (b) </h3> (c) </strong> (d) </b> - 26.True or false: in <img>, height sets how wide it is. (a) False (b) True
-
27.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<h2>Good morning!</h2>
<h2>Rain today</h2> -
28.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> - 29.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
- 30.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 31.True or false: <li> lists things in any order. (a) True (b) False
- 32.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <b>
-
33.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<p>My pets</p> -
34.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> (a) Rain today (b) Good morning! (c) My pets (d) The red kite - 35.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
36.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 37.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <head>
- 38.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
39.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <small>The red kite</small>
line 3: <u>Rain today</u> (a) line 3 (b) line 2 (c) line 1 - 40.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
Answer key
- a web browser
- bullets
- Fun facts
- 9
- href
- as one space
- kite.png
- False
- <h1>
- False
- False
- </u>
- <h1>
- structure
- <p>
- I love mangoes.
- line 1
- opens it in a new tab
- Good morning!
- in the head
- turns HTML into a page
- src
- <h5>
- </strong>
- </em>
- False
- 3
- 1
- <a href="about.html">
- <!DOCTYPE html>
- False
- <hr>
- 1
- Good morning!
- False
- bullets
- </html>
- has a closing tag
- line 1
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids