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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
- 2.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h4>
- 3.True or false: <li> is one item of a list. (a) True (b) False
- 4.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) saves our .html files (d) is where we type code
- 5.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) <\u> (d) </u>
- 6.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 8.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
- 9.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
- 10.Which of these is an opening tag? (a) </p> (b) <li> (c) </body> (d) </b>
- 11.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 12.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
- 13.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
- 14.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
- 15.💬 Does the browser show comments on the page? (a) No (b) Yes
- 16.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <meta charset="utf-8">
-
17.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>The red kite</p> -
18.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Our school trip</p> - 19.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
- 20.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
- 21.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
-
22.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Kites fly high<br>Rivers flow</p> - 23.📄 Can HTML on its own make headings? (a) Yes (b) No
-
24.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab - 25.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
-
26.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> --> -
27.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<small>Cricket is fun.
<em>Rain today</em> (a) </small> (b) </strong> (c) </p> (d) </em> - 28.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
29.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in the same tab (b) in a new tab - 30.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
31.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<h3>Hello, world!</h3>
<p>Fun facts</p>
<p>Hello, world!</p> - 32.True or false: in <img>, src sets how wide it is. (a) True (b) False
-
33.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> - 34.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
- 35.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 36.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
-
37.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) About us (b) news.html (c) art.html (d) maths.html -
38.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<!-- <p>The red kite</p> --> -
39.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Rain today</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Rain today (d) My best friend - 40.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
Answer key
- <ol>
- <h6>
- True
- hosts websites online
- </u>
- True
- No
- a web server
- an attribute
- <li>
- <ul>
- starts a new line
- <!--
- <a>
- No
- <meta charset="utf-8">
- 3
- 3
- a slash /
- 6
- alt
- 4
- Yes
- in the same tab
- src
- 2
- </small>
- Yes
- in the same tab
- Yes
- 2
- False
- 3
- a web browser
- <ul>
- height
- maths.html
- 1
- The red kite
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids