← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 78 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Space Facts (b) Mars is red. (c) index.html (d) Welcome!
  2. 2.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    (a) My pets (b) The red kite (c) Fun facts (d) Rain today
  3. 3.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
  4. 4.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg
  6. 6.True or false: in <img>, height sets how wide it is. (a) True (b) False
  7. 7.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  8. 8.True or false: <title> goes in the head. (a) False (b) True
  9. 9.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep
  11. 11.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
  13. 13.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) is where we type code
  14. 14.Which of these is an empty tag? (a) <p> (b) <ul> (c) <li> (d) <img>
  15. 15.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  17. 17.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  18. 18.📄 Can HTML on its own make tables? (a) No (b) Yes
  19. 19.True or false: in <img>, src sets how tall it is. (a) True (b) False
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
  21. 21.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </html> (c) <html> (d) <body>
  22. 22.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Maths fun (b) Art corner (c) about.html (d) href
  23. 23.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Rain today</h2>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <h2>The red kite</h2>
  25. 25.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  26. 26.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Rivers flow<br>Roses are red</p>
  28. 28.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Stars shine<br>Kites fly high<br>Roses are red</p>
  30. 30.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  31. 31.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) answers page requests
  32. 32.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  33. 33.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="100">
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) The red kite (b) Rain today (c) Fun facts
  36. 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  38. 38.True or false: in <img>, src is read by screen readers. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) Fun facts (c) Cricket is fun. (d) My pets
  40. 40.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>

Answer key

  1. Space Facts
  2. Rain today
  3. <
  4. No
  5. An old fort
  6. False
  7. False
  8. True
  9. in the body
  10. An old fort
  11. in a new tab
  12. <h2>
  13. turns HTML into a page
  14. <img>
  15. -->
  16. numbers
  17. <li>
  18. Yes
  19. False
  20. 1
  21. </html>
  22. Maths fun
  23. in a new tab
  24. 4
  25. True
  26. <ol>
  27. 4
  28. Yes
  29. 5
  30. 2
  31. answers page requests
  32. No
  33. in the body
  34. 100
  35. Fun facts
  36. has a closing tag
  37. <a>
  38. False
  39. My pets
  40. <h5>

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