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.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> - 2.True or false: <li> lists things in any order. (a) False (b) True
- 3.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
4.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Rain today</p>
<p>Our school trip</p> - 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
- 6.Which of these has a closing tag? (a) <input> (b) <br> (c) <img> (d) <p>
- 7.💾 A web page file usually ends with which extension? (a) .html (b) .png (c) .txt (d) .mp3
- 8.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
- 9.True or false: <title> goes in the body. (a) False (b) True
- 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
-
11.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> --> -
12.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>I love mangoes.</h2>
<p>My best friend</p>
<h3>Our school trip</h3>
<h4>Hello, world!</h4> -
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Easy snacks (b) Thanks for visiting. (c) Riya’s Recipes (d) index.html -
14.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Visit the site (b) Contact us (c) href (d) contact.html - 15.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
-
16.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) My pets (b) Good morning! (c) Fun facts - 17.True or false: a web browser shows line numbers. (a) False (b) True
-
18.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg - 19.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
-
20.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) Take the quiz (b) href (c) School news (d) art.html -
21.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> -
22.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 23.True or false: in <img>, src tells which image to load. (a) False (b) True
- 24.Which of these is a closing tag? (a) </p> (b) <p> (c) <h1> (d) <title>
- 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
- 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 27.True or false: HTML on its own can make headings. (a) False (b) True
- 28.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
- 29.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 30.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 31.True or false: in <img>, src names the picture file. (a) False (b) True
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) width (c) A red kite (d) tiger.jpg - 33.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Good morning!</p>
<h4>Our school trip</h4> - 35.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
-
36.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p> (a) Hello, world! (b) The red kite (c) Our school trip -
37.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 38.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h4>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> - 40.True or false: in <img>, alt describes the picture. (a) True (b) False
Answer key
- 2
- False
- a code editor
- 6
- opens it in a new tab
- <p>
- .html
- alt
- False
- an attribute
- 1
- 4
- Riya’s Recipes
- Contact us
- </em>
- Good morning!
- False
- dog.jpg
- <h6>
- School news
- 1
- bullets
- True
- </p>
- <a href="about.html">
- No
- True
- <li>
- to leave notes
- href
- True
- A tiger asleep
- <!--
- 2
- <
- Our school trip
- 3
- <h6>
- 150
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids