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 picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) moon.png (b) A happy dog (c) bus.jpg (d) dog.jpg - 2.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <small> (d) <\small>
- 3.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
- 4.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 5.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
- 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) colours code to help us
- 8.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
-
9.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<p>The red kite</p> - 10.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
- 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 12.Which of these is true of a code editor? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) shows pages from the web
- 13.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 14.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
- 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
16.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) Visit the site (b) about.html (c) href (d) Contact us -
17.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 18.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a printer (d) a paintbrush
-
19.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
20.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My best friend</p>
<h2>My pets</h2>
<p>Good morning!</p>
<h2>My best friend</h2>
<p>My best friend</p> - 21.🔢 In a basic web page file, which comes first: “<head>” or “</head>”? (a) </head> (b) <head>
-
22.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) href (b) quiz.html (c) Maths fun (d) Art corner -
23.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> (a) Rain today (b) My best friend (c) Our school trip (d) My pets - 24.Which of these is an opening tag? (a) </p> (b) <p> (c) </body> (d) </b>
- 25.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 27.True or false: a code editor is where we type code. (a) False (b) True
- 28.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <img> (d) <h1>
-
29.🔍 Which line is missing its closing tag?
line 1: <u>I love mangoes.
line 2: <i>Rain today</i>
line 3: <strong>Hello, world!</strong> (a) line 1 (b) line 3 (c) line 2 -
30.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> -
31.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) contact.html (b) about.html (c) Visit the site (d) games.html - 32.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 33.Which of these goes in the head? (a) <p> (b) <style> (c) <ul> (d) <table>
-
34.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 35.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 36.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
- 37.True or false: HTML on its own can make tables. (a) True (b) False
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 39.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
-
40.🔍 One closing tag is missing. Which one?
<u>Good morning!
<h1>Hello, world!</h1>
<h2>The red kite</h2> (a) </h3> (b) </u> (c) </h2> (d) </h1>
Answer key
- dog.jpg
- </small>
- <li>
- False
- as one space
- No
- colours code to help us
- <h3>
- 3
- element
- Yes
- shows line numbers
- opens it in a new tab
- <h6>
- Yes
- Contact us
- in the same tab
- a plain text editor
- 5
- 4
- <head>
- Maths fun
- Rain today
- <p>
- a closing tag
- <!--
- True
- <link rel="stylesheet">
- line 1
- 1
- games.html
- has a closing tag
- <style>
- in a new tab
- -->
- </head>
- True
- numbers
- <ol>
- </u>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids