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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 3.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text with links (d) text in colour
- 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 5.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <!DOCTYPE html>
-
6.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>My best friend</p> - 7.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 8.True or false: <style> goes in the body. (a) False (b) True
- 9.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
-
10.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) about.html (b) href (c) Art corner (d) Maths fun - 11.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
- 12.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
- 13.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
14.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> - 15.True or false: in <img>, alt describes the picture. (a) False (b) True
- 16.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 17.True or false: a web server opens web pages for us. (a) False (b) True
- 18.True or false: in <img>, src shows if the image fails. (a) True (b) False
- 19.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
20.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) cake.jpg (c) A red kite (d) map.png - 21.Which of these goes in the head? (a) <a> (b) <table> (c) <ul> (d) <title>
-
22.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Hello, world! (b) My best friend (c) Rain today (d) Cricket is fun. - 23.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
- 24.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 26.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 27.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
-
28.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
29.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<!-- <p>Rain today</p> --> - 30.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
31.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) About us (c) art.html (d) href -
32.📋 What number does the browser show next to “Mango”?
<ol start="5">
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 33.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 34.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 36.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
37.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) Rain today (b) Hello, world! (c) Cricket is fun. (d) The red kite - 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
-
39.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!
line 2: <h2>My best friend</h2>
line 3: <strong>My pets</strong> (a) line 3 (b) line 2 (c) line 1 - 40.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
Answer key
- Yes
- No
- text with links
- has a closing tag
- </html>
- 2
- -->
- False
- <h6>
- Maths fun
- opens it in a new tab
- </u>
- a closing tag
- 4
- True
- <ul>
- False
- False
- False
- kite.png
- <title>
- Rain today
- <img>
- a code editor
- bullets
- <ul>
- <a href="about.html">
- 4
- 1
- in the head
- About us
- 6
- Yes
- a code editor
- alt
- <!DOCTYPE html>
- Cricket is fun.
- <h1>
- line 1
- a slash /
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids