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.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Roses are red</p> - 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 3.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
-
4.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> (a) My pets (b) I love mangoes. (c) My best friend - 5.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
6.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) Art corner (b) href (c) School news (d) quiz.html - 7.True or false: <h1> is an empty tag. (a) False (b) True
-
8.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) contact.html (b) Visit the site (c) Contact us (d) href - 9.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 10.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
- 11.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
- 12.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
13.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>My best friend</h2>
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Fun facts</p> - 14.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 16.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 17.True or false: in <img>, src describes the picture. (a) False (b) True
-
18.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) Play games (b) contact.html (c) href (d) About us - 19.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text
- 20.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
- 21.True or false: <ul> goes in the head. (a) False (b) True
-
22.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>Our school trip</p> - 23.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
- 24.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
-
25.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) contact.html (d) href - 26.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
- 28.True or false: HTML on its own can make headings. (a) True (b) False
- 29.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
-
30.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
<li>Papaya</li>
</ul> - 31.True or false: <ul> lists things in any order. (a) False (b) True
- 32.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 33.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <i> (d) <\i>
-
34.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue</p> -
35.📋 What number does the browser show next to “Jamun”?
<ol start="3">
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 36.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
- 37.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 38.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
-
39.🔗 Where does this link open?
<a href="contact.html">Play games</a> (a) in a new tab (b) in the same tab -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) A tiger asleep (b) fort.jpg (c) An old fort (d) width
Answer key
- 5
- <ol>
- a web browser
- My best friend
- in the head
- Art corner
- False
- Contact us
- an empty tag
- to leave notes
- <h1>
- in the head
- 2
- False
- 200
- alt
- False
- Play games
- text with links
- to describe the image
- False
- 2
- <img>
- starts a new line
- Visit the site
- <ul>
- <h6>
- True
- <h2>
- 4
- True
- a closing tag
- </i>
- 2
- 6
- <html>
- <ul>
- 6
- in the same tab
- An old fort
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids