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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) bus.jpg (b) Our school bus (c) width (d) An old fort - 2.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
- 3.True or false: <input> has a closing tag. (a) False (b) True
-
4.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
5.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p> - 6.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
-
7.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<h4>My pets</h4>
<p>I love mangoes.</p> - 8.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
- 9.Which of these is an opening tag? (a) </title> (b) </li> (c) </p> (d) <p>
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 11.Which of these is true of a web server? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) saves our .html files
- 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 13.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 14.🔍 Which is the odd one out? (a) sends pages over the net (b) saves our .html files (c) stores a website’s files (d) answers page requests
- 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Kites fly high</p> -
17.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>Good morning!</p>
<p>Our school trip</p> -
18.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) contact.html (b) href (c) Maths fun (d) Visit the site - 19.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
20.🔗 Where does this link open?
<a href="news.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 21.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
- 22.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
- 23.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 24.True or false: a web browser opens web pages for us. (a) True (b) False
-
25.🔍 One closing tag is missing. Which one?
<b>My best friend</b>
<h3>Cricket is fun.</h3>
<h1>Our school trip (a) </b> (b) </h1> (c) </h3> (d) </i> - 26.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 27.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
- 28.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 29.Which of these is a closing tag? (a) <h1> (b) <b> (c) </li> (d) <body>
- 30.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 31.Which of these is an empty tag? (a) <p> (b) <ul> (c) <li> (d) <input>
- 32.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) body (c) Cricket Club (d) I like to read. - 34.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
-
35.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Cricket is fun.</p>
<p>The red kite</p> - 36.True or false: in <img>, src describes the picture. (a) False (b) True
-
37.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers -
38.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Hello, world!</h2>
<p>The red kite</p>
<h4>The red kite</h4> -
39.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) news.html (b) quiz.html (c) games.html (d) Art corner - 40.Which of these is an empty tag? (a) <h1> (b) <p> (c) <title> (d) <img>
Answer key
- Our school bus
- width
- False
- bullets
- 2
- <li>
- 3
- <h6>
- <p>
- <h1>
- stores a website’s files
- has a closing tag
- a web browser
- saves our .html files
- an opening tag
- 3
- 3
- Visit the site
- <ul>
- in a new tab
- opens it in a new tab
- starts a new line
- the body
- True
- </h1>
- Yes
- as one space
- <a href="about.html">
- </li>
- 1
- <input>
- <h1>
- Welcome!
- to leave notes
- 3
- False
- numbers
- 3
- news.html
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids