← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 830 · 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.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    (a) Hello, world! (b) Good morning! (c) I love mangoes.
  2. 2.True or false: a code editor has an address bar. (a) True (b) False
  3. 3.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) href (b) Maths fun (c) Art corner (d) games.html
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  5. 5.🔍 One closing tag is missing. Which one?
    <strong>Fun facts</strong>
    <h1>The red kite
    <p>My pets</p>
    (a) </p> (b) </small> (c) </strong> (d) </h1>
  6. 6.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  7. 7.True or false: in <img>, width describes the picture. (a) True (b) False
  8. 8.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  9. 9.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) turns HTML into a page (d) colours code to help us
  10. 10.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) Maths fun (b) games.html (c) href (d) Visit the site
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  12. 12.True or false: <li> shows bullet points. (a) True (b) False
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) I love mangoes. (b) Good morning! (c) My best friend (d) Fun facts
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Planets (b) Space Facts (c) index.html (d) I like to read.
  15. 15.🔢 In a basic web page file, which comes first: “</head>” or “<body>”? (a) </head> (b) <body>
  16. 16.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h2>
  18. 18.True or false: <ol> shows bullet points. (a) True (b) False
  19. 19.True or false: <li> has a closing tag. (a) True (b) False
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  21. 21.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.Which of these is true of a code editor? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) opens web pages for us
  23. 23.True or false: a code editor sends pages over the net. (a) True (b) False
  24. 24.🔠 Are headings shown in bold by default? (a) No (b) Yes
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) Good morning! (b) My pets (c) Cricket is fun. (d) I love mangoes.
  26. 26.True or false: <ul> is an unordered list. (a) False (b) True
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) I like to read. (c) All about me (d) index.html
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) Art Gallery (c) I like to read. (d) index.html
  29. 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) index.html (c) Mars is red. (d) Welcome!
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
  33. 33.True or false: in <img>, height names the picture file. (a) False (b) True
  34. 34.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  35. 35.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) </html> (d) <!DOCTYPE html>
  36. 36.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>Rain today</p>
    <p>Good morning!</p>
  37. 37.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  38. 38.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.
    <em>My pets</em>
    (a) </em> (b) </p> (c) </u> (d) </h2>
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Welcome! (d) My Hobbies
  40. 40.True or false: <ul> is an ordered list. (a) True (b) False

Answer key

  1. I love mangoes.
  2. False
  3. Maths fun
  4. <h6>
  5. </h1>
  6. <li>
  7. False
  8. in a new tab
  9. turns HTML into a page
  10. Visit the site
  11. 4
  12. False
  13. Good morning!
  14. Space Facts
  15. </head>
  16. an empty tag
  17. <h1>
  18. False
  19. True
  20. Yes
  21. has a closing tag
  22. colours code to help us
  23. False
  24. Yes
  25. Cricket is fun.
  26. True
  27. My Hobbies
  28. Art Gallery
  29. <ol>
  30. 3
  31. Art Gallery
  32. 1
  33. False
  34. height
  35. <!DOCTYPE html>
  36. 2
  37. map.png
  38. </p>
  39. My Hobbies
  40. False

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