← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 8 · 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.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  3. 3.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <p>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) dog.jpg (b) width (c) The full moon (d) A happy dog
  5. 5.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  6. 6.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) href (c) Play games (d) About us
  7. 7.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h5>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
  8. 8.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
  11. 11.🖼️ 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
  12. 12.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  14. 14.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  16. 16.📄 Can HTML on its own make a form? (a) Yes (b) No
  17. 17.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h1>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h1>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  19. 19.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  20. 20.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My best friend</p>
    <h4>Hello, world!</h4>
    <p>The red kite</p>
    <p>Fun facts</p>
  21. 21.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  22. 22.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  23. 23.📄 Can HTML on its own make headings? (a) Yes (b) No
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Rain today (b) Fun facts (c) Good morning!
  26. 26.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) Birthday cake (c) width (d) map.png
  28. 28.Which of these is true of a code editor? (a) turns HTML into a page (b) is where we type code (c) sends pages over the net (d) answers page requests
  29. 29.True or false: <input> is an empty tag. (a) False (b) True
  30. 30.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) art.html (b) Play games (c) news.html (d) maths.html
  31. 31.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h3>Rain today</h3>
  32. 32.🔍 One closing tag is missing. Which one?
    <h3>Fun facts
    <h2>Cricket is fun.</h2>
    <em>I love mangoes.</em>
    (a) </em> (b) </h1> (c) </h3> (d) </h2>
  33. 33.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  34. 34.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  35. 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <ul>
  36. 36.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) about.html (c) href (d) Take the quiz
  38. 38.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  39. 39.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  40. 40.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) sends pages over the net (d) shows pages from the web

Answer key

  1. in the head
  2. numbers
  3. <p>
  4. A happy dog
  5. src
  6. Play games
  7. <h5>
  8. <h1>
  9. 350
  10. <h2>
  11. to describe the image
  12. numbers
  13. <h1>
  14. a closing tag
  15. <h1>
  16. Yes
  17. <h1>
  18. <h6>
  19. <h6>
  20. 2
  21. to leave notes
  22. <ul>
  23. Yes
  24. a slash /
  25. Rain today
  26. <a>
  27. Map of India
  28. is where we type code
  29. True
  30. maths.html
  31. 2
  32. </h3>
  33. True
  34. <ol>
  35. <ul>
  36. HyperText
  37. Take the quiz
  38. <h6>
  39. <h6>
  40. sends pages over the net

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