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.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
- 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
- 3.True or false: a web server hosts websites online. (a) False (b) True
- 4.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) saves our .html files (d) sends pages over the net
- 5.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) shows pages from the web (d) has an address bar
- 6.True or false: HTML on its own can make a form. (a) False (b) True
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Birthday cake (b) width (c) map.png (d) Map of India - 8.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
-
9.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) Visit the site (d) href -
10.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) art.html -
11.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) href (c) games.html (d) Contact us - 12.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
- 13.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 14.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
-
15.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) href (b) About us (c) quiz.html (d) Contact us - 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
-
17.📋 What number does the browser show next to “Guava”?
<ol start="3">
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
- 19.🔢 In a basic web page file, which comes first: “<head>” or “</head>”? (a) <head> (b) </head>
- 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> - 22.💬 Does the browser show comments on the page? (a) No (b) Yes
-
23.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> (a) The red kite (b) Fun facts (c) Rain today (d) I love mangoes. - 24.Which of these is a closing tag? (a) <body> (b) </body> (c) <title> (d) <b>
- 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 26.True or false: HTML on its own can add up two numbers. (a) False (b) True
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) width (b) Our school bus (c) bus.jpg (d) An old fort - 28.Which of these is a closing tag? (a) <body> (b) <title> (c) </b> (d) <li>
-
29.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<p>My best friend</p>
<p>Rain today</p>
<p>Good morning!</p>
<p>Our school trip</p> - 30.True or false: HTML on its own can make headings. (a) False (b) True
- 31.True or false: <ul> lists things in any order. (a) True (b) False
- 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
33.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>My pets</h2>
<h2>Fun facts</h2>
<p>The red kite</p>
<p>I love mangoes.</p> - 34.Which of these is an opening tag? (a) <b> (b) </p> (c) </b> (d) </title>
- 35.🖼️ 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
- 36.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <li> (d) <b>
-
37.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> - 38.Which of these has a closing tag? (a) <input> (b) <br> (c) <h1> (d) <meta>
- 39.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 40.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text
Answer key
- structure
- alt
- True
- has an address bar
- hosts websites online
- True
- Map of India
- a web browser
- Contact us
- Take the quiz
- Contact us
- to leave notes
- -->
- <a>
- About us
- <h2>
- 4
- src
- <head>
- <h5>
- 400
- No
- Rain today
- </body>
- Yes
- False
- Our school bus
- </b>
- 6
- True
- True
- No
- 3
- <b>
- to describe the image
- <meta>
- 1
- <h1>
- opens it in a new tab
- text with links
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids