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.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 2.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
- 3.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
- 4.🔍 Which is the odd one out? (a) shows pages from the web (b) answers page requests (c) stores a website’s files (d) sends pages over the net
-
5.🔍 One closing tag is missing. Which one?
<h2>Our school trip
<u>Cricket is fun.</u>
<em>I love mangoes.</em> (a) </u> (b) </em> (c) </h1> (d) </h2> -
6.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Cricket is fun.</h2>
<p>Fun facts</p> - 7.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
- 8.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
- 9.🔍 Which is the odd one out? (a) answers page requests (b) opens web pages for us (c) shows pages from the web (d) turns HTML into a page
- 10.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.Which of these goes in the body? (a) <p> (b) <style> (c) <title> (d) <link rel="stylesheet">
- 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
- 13.True or false: <img> goes in the head. (a) True (b) False
- 14.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
- 15.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 16.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
- 17.📄 Can HTML on its own make headings? (a) No (b) Yes
- 18.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <body> (c) </html> (d) <!DOCTYPE html>
- 19.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 20.True or false: HTML on its own can pick a random number. (a) False (b) True
- 21.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>
- 22.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 23.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 24.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
26.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) contact.html (c) School news (d) about.html - 27.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) width (d) height
- 28.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
-
29.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) The full moon (c) width (d) dog.jpg - 32.True or false: HTML on its own can keep a high score. (a) True (b) False
- 33.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
-
34.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>Rain today</p> (a) Our school trip (b) The red kite (c) My best friend (d) Rain today - 35.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) colours code to help us
- 36.📝 What do we need to write HTML? (a) a paintbrush (b) a printer (c) a microphone (d) a plain text editor
- 37.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) index.html (c) Class 7 Blog (d) Match report - 39.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) colours code to help us (d) hosts websites online
- 40.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
Answer key
- Yes
- width
- <h1>
- shows pages from the web
- </h2>
- 2
- starts a new line
- <h5>
- answers page requests
- an opening tag
- <p>
- <h6>
- False
- on the browser tab
- <ul>
- <h1>
- Yes
- </html>
- a web browser
- False
- </h1>
- alt
- <ol>
- <li>
- bullets
- about.html
- src
- an attribute
- in the same tab
- Birthday cake
- A happy dog
- False
- <h6>
- My best friend
- colours code to help us
- a plain text editor
- to leave notes
- Class 7 Blog
- hosts websites online
- opens it in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids