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.Which of these is true of a web server? (a) shows pages from the web (b) sends pages over the net (c) opens web pages for us (d) shows line numbers
-
2.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Hello, world!</p> -
3.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon - 4.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Roses are red</p> - 6.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 7.Which of these has a closing tag? (a) <br> (b) <img> (c) <p> (d) <input>
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) Map of India (c) A red kite (d) width -
9.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) quiz.html (b) Contact us (c) news.html (d) games.html - 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
- 11.True or false: a code editor sends pages over the net. (a) False (b) True
- 12.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
13.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!</b>
line 2: <strong>My best friend</strong>
line 3: <h2>The red kite (a) line 1 (b) line 3 (c) line 2 - 14.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
-
15.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in a new tab (b) in the same tab - 16.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
- 18.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
- 19.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
-
20.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) I love mangoes. (b) Rain today (c) Hello, world! - 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <img>
- 22.True or false: <ul> is an unordered list. (a) False (b) True
- 23.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
- 24.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 25.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
-
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) Match report (d) My Hobbies - 27.Which of these is true of a code editor? (a) shows line numbers (b) sends pages over the net (c) answers page requests (d) stores a website’s files
- 28.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
-
29.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) Art corner (b) contact.html (c) games.html (d) about.html - 30.True or false: a web server colours code to help us. (a) False (b) True
- 31.Which of these goes in the head? (a) <img> (b) <h1> (c) <p> (d) <meta charset="utf-8">
-
32.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) My pets -
33.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) news.html (b) maths.html (c) Take the quiz (d) art.html - 34.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
- 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 36.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
-
37.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) Contact us (c) games.html (d) contact.html - 38.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 39.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
40.🔍 One closing tag is missing. Which one?
<h2>My pets
<strong>I love mangoes.</strong>
<h3>Cricket is fun.</h3> (a) </strong> (b) </p> (c) </h2> (d) </h3>
Answer key
- sends pages over the net
- 3
- moon.png
- <ul>
- 3
- <ul>
- <p>
- A red kite
- news.html
- an attribute
- False
- href
- line 3
- to leave notes
- in the same tab
- an opening tag
- <h5>
- <img>
- <h2>
- Rain today
- <img>
- True
- <h6>
- a web browser
- <h1>
- My Hobbies
- shows line numbers
- the body
- games.html
- False
- <meta charset="utf-8">
- Fun facts
- maths.html
- alt
- <a>
- <a href="about.html">
- games.html
- in the body
- in the head
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids