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.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
- 2.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a paintbrush (d) a microphone
- 3.🔍 Which is the odd one out? (a) hosts websites online (b) shows line numbers (c) stores a website’s files (d) sends pages over the net
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> - 5.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
-
6.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
7.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) https://example.com (c) art.html (d) maths.html -
8.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) Art corner (b) href (c) news.html (d) Maths fun - 9.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
- 10.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a paint program (d) a music player
- 11.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 12.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <title>
- 13.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) wires (d) keys
-
14.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) https://example.com (c) Visit the site (d) href - 15.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
-
16.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>Our school trip</p> -
17.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) Our school trip (c) Fun facts (d) My pets - 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
-
19.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) games.html (b) about.html (c) contact.html (d) School news -
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Our school trip</h2>
<h2>Hello, world!</h2> - 21.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 22.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
- 23.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 25.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
26.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> --> -
27.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing</p> - 28.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 29.True or false: <p> is an empty tag. (a) False (b) True
- 30.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
-
31.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Papaya</li>
</ol> -
32.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Rain today</h2>
<p>Hello, world!</p> - 33.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) </body> (b) <html>
- 34.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 35.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 36.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 37.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
- 38.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
- 39.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 40.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
Answer key
- to describe the image
- a plain text editor
- shows line numbers
- 50
- <ol>
- numbers
- https://example.com
- Maths fun
- <
- a web browser
- <h1>
- </p>
- tags
- Visit the site
- href
- 2
- Our school trip
- element
- games.html
- 3
- has a closing tag
- src
- <h1>
- 100
- True
- 1
- 2
- the body
- False
- <ul>
- 2
- 2
- <html>
- <h2>
- <a href="about.html">
- opens it in a new tab
- an attribute
- <h1>
- Yes
- on the browser tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids