← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 766 · 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.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) All about me (d) Try this poha.
  4. 4.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) </h2> (d) <h2>
  5. 5.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  6. 6.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  7. 7.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Art Gallery (c) My drawings (d) Thanks for visiting.
  8. 8.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </p>
  9. 9.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  10. 10.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <b>Rain today</b>
    <p>Good morning!
    (a) </p> (b) </b> (c) </h1> (d) </i>
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <em>Good morning!</em>
    line 2: <p>My pets
    line 3: <u>My best friend</u>
    (a) line 1 (b) line 2 (c) line 3
  12. 12.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <h1> (d) <p>
  13. 13.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    (a) Rain today (b) My best friend (c) My pets
  15. 15.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) Birthday cake (b) Map of India (c) map.png (d) width
  17. 17.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
  18. 18.True or false: <title> has a closing tag. (a) True (b) False
  19. 19.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) turns HTML into a page
  20. 20.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  21. 21.Which of these has a closing tag? (a) <br> (b) <ul> (c) <img> (d) <hr>
  22. 22.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  25. 25.🔗 Where does this link open?
    <a href="news.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
  27. 27.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  28. 28.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) saves our .html files (d) stores a website’s files
  29. 29.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
  30. 30.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Art Gallery (c) index.html (d) Easy snacks
  32. 32.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  34. 34.🔗 Where does this link open?
    <a href="art.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  35. 35.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) About us (c) games.html (d) href
  36. 36.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) index.html (c) Match report (d) Try this poha.
  38. 38.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
  39. 39.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <h1> (d) <link rel="stylesheet">

Answer key

  1. an empty tag
  2. <!DOCTYPE html>
  3. All about me
  4. </h2>
  5. map.png
  6. Yes
  7. Art Gallery
  8. </p>
  9. <h1>
  10. </p>
  11. line 2
  12. <h6>
  13. an opening tag
  14. My best friend
  15. <h1>
  16. Map of India
  17. an attribute
  18. True
  19. turns HTML into a page
  20. 2
  21. <ul>
  22. a closing tag
  23. has a closing tag
  24. 1
  25. in the same tab
  26. alt
  27. a web browser
  28. stores a website’s files
  29. src
  30. 4
  31. Art Gallery
  32. <!--
  33. Yes
  34. in a new tab
  35. About us
  36. False
  37. Art Gallery
  38. Language
  39. in the body
  40. <h1>

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