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 <img> go: in the head or in the body? (a) in the body (b) in the head
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> - 3.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 4.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h1>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) The full moon (c) dog.jpg (d) A happy dog - 6.True or false: HTML on its own cannot make headings. (a) True (b) False
- 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 8.True or false: <title> goes in the head. (a) False (b) True
- 9.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 10.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) shows line numbers (d) shows pages from the web
- 11.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 12.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
- 13.True or false: HTML on its own cannot make tables. (a) True (b) False
- 14.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 15.Which of these goes in the head? (a) <style> (b) <h1> (c) <ul> (d) <img>
- 16.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h3>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 18.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
-
19.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 20.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h2> (c) <h1> (d) <h6>
-
21.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) https://example.com - 22.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
- 23.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) map.png (b) A tiger asleep (c) tiger.jpg (d) kite.png - 25.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
- 26.📄 Can HTML on its own make headings? (a) Yes (b) No
- 27.True or false: <ol> shows bullet points. (a) False (b) True
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) My Hobbies (c) All about me (d) body - 29.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
- 30.📝 What does <p> make? (a) a link (b) a picture (c) a table (d) a paragraph
- 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
-
32.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>My pets</p>
<p>Fun facts</p> (a) Hello, world! (b) My pets (c) Fun facts (d) I love mangoes. -
33.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Good morning!</p> (a) The red kite (b) Good morning! (c) Cricket is fun. -
34.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<!-- <p>Our school trip</p> --> - 35.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) opens web pages for us (d) shows line numbers
- 36.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 39.Which of these is an empty tag? (a) <ul> (b) <li> (c) <input> (d) <p>
-
40.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
Answer key
- in the body
- 300
- a closing tag
- <h1>
- A happy dog
- False
- has a closing tag
- True
- a code editor
- shows pages from the web
- No
- alt
- False
- in the head
- <style>
- on the browser tab
- <h5>
- a code editor
- numbers
- <h6>
- Maths fun
- an attribute
- an empty tag
- tiger.jpg
- 6
- Yes
- False
- All about me
- <!--
- a paragraph
- <h1>
- I love mangoes.
- Cricket is fun.
- 1
- opens web pages for us
- <h6>
- <h5>
- bullets
- <input>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids