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 an opening tag? (a) </title> (b) <p> (c) </p> (d) </body>
-
2.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>My best friend</h2> - 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
-
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Match report (b) body (c) Try this poha. (d) Space Facts - 5.True or false: <li> goes inside ul or ol. (a) False (b) True
- 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 7.Which of these is an opening tag? (a) </li> (b) </body> (c) </p> (d) <h1>
- 8.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 9.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 10.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) opens web pages for us (d) is where we type code
- 11.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
- 12.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.📋 What number does the browser show next to “Orange”?
<ol start="4">
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width - 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 16.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 17.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 18.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 19.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 20.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) sends pages over the net
- 21.True or false: <img> has a closing tag. (a) True (b) False
-
22.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) contact.html (b) Play games (c) maths.html (d) https://example.com - 23.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
-
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Cricket Club (c) Try this poha. (d) All about me - 25.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
- 26.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
27.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Birds sing</p> - 28.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
-
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Welcome! (b) Here is my best one. (c) index.html (d) Art Gallery - 30.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
- 31.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <ul> (d) <style>
- 32.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
- 33.True or false: <li> is one item of a list. (a) True (b) False
- 34.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <body> (b) <html>
-
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Class 7 Blog (b) Planets (c) We won by 5 runs. (d) index.html - 36.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
- 37.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) </body>
- 38.True or false: <input> has a closing tag. (a) False (b) True
- 39.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
- 40.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) sends pages over the net (d) is where we type code
Answer key
- <p>
- 2
- as one space
- Match report
- True
- Yes
- <h1>
- <ol>
- href
- opens web pages for us
- src
- a closing tag
- 5
- A tiger asleep
- <ol>
- <ul>
- a paragraph
- <h1>
- <img>
- turns HTML into a page
- False
- contact.html
- <a href="about.html">
- All about me
- <h6>
- True
- 3
- a web browser
- Art Gallery
- <h6>
- <ul>
- src
- True
- <html>
- Class 7 Blog
- Markup
- </html>
- False
- starts a new line
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids