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.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
- 2.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
-
3.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Rain today (c) I love mangoes. - 4.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
- 5.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 6.True or false: <ul> is an ordered list. (a) False (b) True
-
7.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>My pets</h2>
<h2>My pets</h2> - 8.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg - 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
-
11.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Hello, world!</p>
<h2>The red kite</h2> - 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
- 13.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
-
14.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> -
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Art Gallery (d) Easy snacks - 16.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 18.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <input> (d) <b>
- 19.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 20.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 21.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
- 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
23.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>The red kite</p> (a) The red kite (b) Fun facts (c) I love mangoes. - 24.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 25.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) alt (c) height (d) src
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> -
27.🔍 One closing tag is missing. Which one?
<h2>Fun facts
<em>Rain today</em>
<h3>The red kite</h3> (a) </h3> (b) </em> (c) </small> (d) </h2> -
28.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 29.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
-
30.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
</ol> -
31.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) The red kite (b) Fun facts (c) My pets (d) I love mangoes. -
32.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
</ul> - 33.Which of these goes in the body? (a) <title> (b) <h1> (c) <style> (d) <meta charset="utf-8">
- 34.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
35.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <u>My best friend</u>
line 3: <b>I love mangoes. (a) line 1 (b) line 2 (c) line 3 - 36.Which of these is true of a web server? (a) colours code to help us (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
- 38.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
Answer key
- text with links
- <h6>
- Cricket is fun.
- <h6>
- No
- False
- 3
- <ol>
- A tiger asleep
- <!DOCTYPE html>
- 2
- <h1>
- a plain text editor
- 2
- Art Gallery
- a closing tag
- a closing tag
- <b>
- href
- in the head
- structure
- Yes
- I love mangoes.
- <img>
- width
- 250
- </h2>
- 5
- <li>
- 2
- Fun facts
- 3
- <h1>
- in the head
- line 3
- stores a website’s files
- <h6>
- a web browser
- an opening tag
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids