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 true of a web browser? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) shows line numbers
-
2.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Banana</li>
<li>Papaya</li>
</ol> -
3.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png - 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
- 5.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 6.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 7.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
- 8.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
- 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
-
10.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab -
11.📋 What number does the browser show next to “Grapes”?
<ol start="6">
<li>Litchi</li>
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
</ol> - 12.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
-
13.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
14.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Our school trip</p>
<p>My best friend</p>
<p>My best friend</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2> -
15.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Our school trip (c) The red kite - 16.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
17.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) contact.html (c) maths.html (d) Visit the site - 18.💬 Does the browser show comments on the page? (a) Yes (b) No
-
19.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Thanks for visiting. (c) Space Facts (d) All about me - 20.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
- 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
-
22.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Hello, world!</p>
<p>Good morning!</p> - 23.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .mp3 (d) .png
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
25.🔍 One closing tag is missing. Which one?
<u>Cricket is fun.
<small>I love mangoes.</small>
<strong>Fun facts</strong> (a) </u> (b) </h2> (c) </strong> (d) </small> - 26.Which of these is true of a web server? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) hosts websites online
- 27.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
-
28.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png - 29.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
- 30.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
- 31.True or false: <ol> is one item of a list. (a) True (b) False
-
32.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p> -
33.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 34.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
-
35.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <p>The red kite
line 3: <strong>Fun facts</strong> (a) line 2 (b) line 1 (c) line 3 - 36.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) saves our .html files (d) hosts websites online
- 37.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
- 38.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
- 39.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
- 40.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- turns HTML into a page
- 3
- dog.jpg
- as one space
- a code editor
- has a closing tag
- opens it in a new tab
- an attribute
- <a href="about.html">
- in the same tab
- 7
- <h2>
- 2
- 5
- Rain today
- <ul>
- contact.html
- No
- Space Facts
- href
- 1
- 5
- .html
- bullets
- </u>
- hosts websites online
- <h5>
- dog.jpg
- Markup
- a slash /
- False
- 2
- 3
- to leave notes
- line 2
- hosts websites online
- a line across the page
- <h1>
- src
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids