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.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
2.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> - 3.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
- 4.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
- 5.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
- 6.True or false: <ul> is an unordered list. (a) True (b) False
- 7.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
-
8.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) A tiger asleep (b) tiger.jpg (c) kite.png (d) map.png - 9.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
- 10.True or false: <ol> is one item of a list. (a) True (b) False
-
11.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) href (b) about.html (c) Maths fun (d) Art corner -
12.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) art.html (b) href (c) Art corner (d) Maths fun - 13.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
-
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) My drawings (c) Class 7 Blog (d) body -
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Welcome! (c) Here is my best one. (d) body - 16.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
- 17.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 18.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 19.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog - 21.Which of these is true of a web browser? (a) colours code to help us (b) shows pages from the web (c) saves our .html files (d) hosts websites online
- 22.Which of these has a closing tag? (a) <img> (b) <b> (c) <hr> (d) <meta>
- 23.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 24.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
-
25.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) Take the quiz (b) https://example.com (c) contact.html (d) about.html -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) The full moon (b) Our school bus (c) moon.png (d) width -
27.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ul> - 28.Which of these is a closing tag? (a) <h1> (b) <li> (c) </p> (d) <title>
- 29.True or false: in <img>, src names the picture file. (a) True (b) False
-
30.🔗 Where does this link open?
<a href="about.html">School news</a> (a) in a new tab (b) in the same tab - 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
- 32.Which of these has a closing tag? (a) <ul> (b) <hr> (c) <input> (d) <img>
-
33.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
</ol> -
34.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> (a) I love mangoes. (b) Our school trip (c) Fun facts (d) Cricket is fun. - 35.Which of these has a closing tag? (a) <li> (b) <input> (c) <hr> (d) <meta>
- 36.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 37.📝 What do we need to write HTML? (a) a microphone (b) a printer (c) a plain text editor (d) a paintbrush
-
38.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<p>My pets</p> -
39.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Play games (b) Take the quiz (c) https://example.com (d) href - 40.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
Answer key
- Yes
- 2
- to leave notes
- 1
- starts a new line
- True
- src
- tiger.jpg
- <h6>
- False
- Maths fun
- Maths fun
- <body>
- My drawings
- Welcome!
- <!--
- Yes
- <!DOCTYPE html>
- -->
- Birthday cake
- shows pages from the web
- <b>
- 6
- a web browser
- about.html
- The full moon
- 4
- </p>
- True
- in the same tab
- as one space
- <ul>
- 4
- Cricket is fun.
- <li>
- Yes
- a plain text editor
- 5
- Take the quiz
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids