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 a closing tag? (a) <body> (b) </title> (c) <title> (d) <p>
-
2.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> (a) My pets (b) Hello, world! (c) Fun facts (d) I love mangoes. -
3.🔍 Which line is missing its closing tag?
line 1: <p>Fun facts
line 2: <strong>Good morning!</strong>
line 3: <em>Cricket is fun.</em> (a) line 2 (b) line 3 (c) line 1 - 4.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 5.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
- 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
7.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>I love mangoes.</h2>
<h2>Fun facts</h2> - 8.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 9.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
10.🔍 Which line is missing its closing tag?
line 1: <h3>I love mangoes.</h3>
line 2: <small>Hello, world!
line 3: <h2>My best friend</h2> (a) line 3 (b) line 1 (c) line 2 - 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
- 12.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 13.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
-
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Welcome! (c) Space Facts (d) body -
16.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>I love mangoes.</p>
<p>My best friend</p> -
17.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<p>Fun facts</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<h2>Fun facts</h2> -
18.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> (a) The red kite (b) I love mangoes. (c) Hello, world! - 19.True or false: <li> is an empty tag. (a) True (b) False
-
20.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) School news (b) href (c) art.html (d) Take the quiz - 21.True or false: <img> goes in the body. (a) False (b) True
- 22.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Hot Tags (d) Home Text
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg -
24.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) Take the quiz (d) href - 25.Which of these is true of a web server? (a) has an address bar (b) saves our .html files (c) opens web pages for us (d) stores a website’s files
- 26.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="400"> -
28.🔍 One closing tag is missing. Which one?
<strong>My pets</strong>
<h3>I love mangoes.
<h1>My best friend</h1> (a) </strong> (b) </i> (c) </h1> (d) </h3> - 29.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
- 30.Which of these is an empty tag? (a) <title> (b) <b> (c) <input> (d) <ul>
- 31.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
- 32.Which of these is true of a code editor? (a) is where we type code (b) stores a website’s files (c) answers page requests (d) shows pages from the web
- 33.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Rain today</p>
<p>My pets</p> -
35.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 36.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
- 37.True or false: HTML on its own can keep a high score. (a) False (b) True
- 38.True or false: <h1> goes in the body. (a) True (b) False
- 39.True or false: in <img>, width names the picture file. (a) True (b) False
-
40.🔗 Which address opens when you click this link?
<a href="https://example.com">Take the quiz</a> (a) maths.html (b) art.html (c) Take the quiz (d) https://example.com
Answer key
- </title>
- My pets
- line 1
- <a>
- .html
- Yes
- 1
- No
- <ul>
- line 2
- alt
- <a href="about.html">
- <ul>
- opens it in a new tab
- Welcome!
- 3
- 3
- I love mangoes.
- False
- School news
- True
- HyperText
- A tiger asleep
- Take the quiz
- stores a website’s files
- <
- 400
- </h3>
- <!DOCTYPE html>
- <input>
- 1
- is where we type code
- a paragraph
- 1
- numbers
- <!DOCTYPE html>
- False
- True
- False
- https://example.com
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids