← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 917 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Stars shine</p>
  2. 2.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  3. 3.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) map.png (b) dog.jpg (c) cake.jpg (d) Map of India
  4. 4.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
  5. 5.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  6. 6.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  7. 7.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) My drawings (d) Try this poha.
  9. 9.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine</p>
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) Planets (c) Try this poha. (d) index.html
  12. 12.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  13. 13.True or false: <ul> is an unordered list. (a) False (b) True
  14. 14.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  15. 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
  17. 17.Which of these is a closing tag? (a) <p> (b) <h1> (c) <b> (d) </h1>
  18. 18.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Stars shine</p>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  21. 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  22. 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  23. 23.🌐 Which one sends pages over the net? (a) a code editor (b) a web server (c) a web browser
  24. 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h1>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
  25. 25.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  26. 26.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <h3>The red kite</h3>
    <h2>My best friend</h2>
  28. 28.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  29. 29.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  30. 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  32. 32.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) </small> (d) <small/>
  33. 33.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  34. 34.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    (a) I love mangoes. (b) My pets (c) Rain today (d) The red kite
  35. 35.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
  37. 37.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <head>
  38. 38.Which of these goes in the head? (a) <p> (b) <meta charset="utf-8"> (c) <a> (d) <h1>
  39. 39.True or false: <li> is one item of a list. (a) False (b) True
  40. 40.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table

Answer key

  1. 5
  2. to describe the image
  3. map.png
  4. a slash /
  5. 2
  6. <h1>
  7. <a>
  8. Space Facts
  9. 2
  10. 2
  11. Art Gallery
  12. 3
  13. True
  14. alt
  15. <ol>
  16. <h3>
  17. </h1>
  18. <li>
  19. 3
  20. Map of India
  21. <ol>
  22. No
  23. a web server
  24. <h6>
  25. a code editor
  26. in the body
  27. 4
  28. <ul>
  29. 6
  30. in the body
  31. the body
  32. </small>
  33. a closing tag
  34. The red kite
  35. 1
  36. 2
  37. </html>
  38. <meta charset="utf-8">
  39. True
  40. a line across the page

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