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.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
2.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>The red kite</p> (a) My pets (b) Hello, world! (c) Good morning! (d) The red kite -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) A happy dog (b) width (c) Birthday cake (d) cake.jpg - 4.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
-
5.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
6.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> - 7.True or false: in <img>, src names the picture file. (a) False (b) True
- 8.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
-
9.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) Good morning! (b) Cricket is fun. (c) My pets (d) The red kite - 10.True or false: a code editor saves our .html files. (a) False (b) True
-
11.🔍 One closing tag is missing. Which one?
<b>I love mangoes.</b>
<small>Rain today
<em>Fun facts</em> (a) </b> (b) </small> (c) </em> (d) </strong> - 12.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) height (d) src
-
13.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Roses are red</p> - 14.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
- 15.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
17.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
-
19.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) https://example.com (b) School news (c) Take the quiz (d) href - 20.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
21.🖼️ 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 - 22.True or false: a web browser has an address bar. (a) True (b) False
- 23.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 24.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
- 25.True or false: in <img>, src tells which image to load. (a) True (b) False
- 26.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 27.True or false: <img> goes in the head. (a) False (b) True
-
28.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<p>Hello, world!</p> - 29.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 30.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .html (d) .txt
-
31.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) https://example.com (c) maths.html (d) art.html -
32.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Papaya</li>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 33.True or false: in <img>, width sets how tall it is. (a) True (b) False
-
34.🔗 Where does this link open?
<a href="contact.html">Art corner</a> (a) in the same tab (b) in a new tab - 35.Which of these goes in the head? (a) <p> (b) <a> (c) <meta charset="utf-8"> (d) <h1>
- 36.True or false: <li> goes inside ul or ol. (a) True (b) False
- 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
- 38.True or false: HTML on its own can make headings. (a) False (b) True
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
-
40.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) maths.html (b) School news (c) news.html (d) art.html
Answer key
- in a new tab
- Good morning!
- Birthday cake
- element
- bullets
- 5
- True
- <h6>
- Cricket is fun.
- True
- </small>
- alt
- 5
- starts a new line
- <h6>
- Yes
- 5
- <h6>
- School news
- <li>
- kite.png
- True
- a web browser
- <li>
- True
- <ul>
- False
- 2
- <a href="about.html">
- .html
- https://example.com
- 9
- False
- in the same tab
- <meta charset="utf-8">
- True
- 1
- True
- <h4>
- maths.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids