← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 599 · 40 questions
TalentJR

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. 1.True or false: in <img>, alt names the picture file. (a) False (b) True
  2. 2.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  3. 3.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <p>Our school trip</p>
    <h3>Hello, world!</h3>
    <h2>My pets</h2>
  4. 4.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  5. 5.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  6. 6.True or false: <ol> is one item of a list. (a) False (b) True
  7. 7.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <h2>My best friend</h2>
  8. 8.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  11. 11.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.📄 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) Here is my best one. (c) body (d) Welcome!
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Sky is blue</p>
  14. 14.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
  15. 15.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>I love mangoes.</h4>
    <h2>Rain today</h2>
    <p>Rain today</p>
  17. 17.Which of these is an opening tag? (a) </p> (b) <h1> (c) </b> (d) </li>
  18. 18.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  19. 19.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  20. 20.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) width (c) bus.jpg (d) Our school bus
  22. 22.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) opens web pages for us
  23. 23.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  24. 24.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  25. 25.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <h4>Our school trip</h4>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  27. 27.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) secret text (d) very big text
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts</i>
    line 2: <u>The red kite</u>
    line 3: <p>My best friend
    (a) line 1 (b) line 3 (c) line 2
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  30. 30.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <head>
  31. 31.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  32. 32.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Cricket is fun.</h2>
    <h2>I love mangoes.</h2>
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <h4>My pets</h4>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  34. 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  35. 35.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) href (c) maths.html (d) Visit the site
  36. 36.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
  38. 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  39. 39.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
  40. 40.Which of these is a closing tag? (a) <b> (b) <li> (c) <title> (d) </title>

Answer key

  1. False
  2. 3
  3. 3
  4. in a new tab
  5. Yes
  6. False
  7. 2
  8. has a closing tag
  9. the body
  10. 3
  11. an empty tag
  12. Welcome!
  13. 3
  14. <h6>
  15. <h6>
  16. 3
  17. <h1>
  18. bullets
  19. 6
  20. <ul>
  21. Our school bus
  22. opens web pages for us
  23. a line across the page
  24. on the browser tab
  25. 2
  26. bullets
  27. text with links
  28. line 3
  29. 200
  30. </html>
  31. in a new tab
  32. 1
  33. 2
  34. to describe the image
  35. Contact us
  36. 3
  37. 2
  38. <ol>
  39. <body>
  40. </title>

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids