← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 518 · 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.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) width (b) Our school bus (c) An old fort (d) bus.jpg
  3. 3.True or false: HTML on its own can make bullet lists. (a) False (b) True
  4. 4.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <h2>The red kite</h2>
    <p>My best friend</p>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  6. 6.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  8. 8.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today</h3>
    line 2: <p>My pets
    line 3: <h2>Cricket is fun.</h2>
    (a) line 3 (b) line 1 (c) line 2
  10. 10.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
  11. 11.Which of these goes in the head? (a) <img> (b) <title> (c) <a> (d) <table>
  12. 12.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) About us (b) about.html (c) quiz.html (d) games.html
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep
  14. 14.📄 Can HTML on its own make headings? (a) No (b) Yes
  15. 15.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  17. 17.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <h3>Our school trip</h3>
    <em>Cricket is fun.
    (a) </h1> (b) </h3> (c) </em> (d) </b>
  18. 18.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
  19. 19.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>The red kite</h3>
    <h2>Good morning!</h2>
  21. 21.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <h4>Hello, world!</h4>
  22. 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.True or false: <b> has a closing tag. (a) False (b) True
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
  25. 25.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ul>
  26. 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
  27. 27.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  28. 28.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  29. 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  30. 30.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  31. 31.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) answers page requests (d) shows pages from the web
  32. 32.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
  34. 34.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) My pets (b) Fun facts (c) Hello, world! (d) Rain today
  35. 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  36. 36.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  37. 37.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  38. 38.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  39. 39.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) width (c) Our school bus (d) The full moon

Answer key

  1. <!--
  2. Our school bus
  3. True
  4. 2
  5. 6
  6. </em>
  7. <h1>
  8. to describe the image
  9. line 2
  10. <html>
  11. <title>
  12. quiz.html
  13. An old fort
  14. Yes
  15. an opening tag
  16. in a new tab
  17. </em>
  18. <h6>
  19. in the body
  20. 3
  21. 3
  22. in the head
  23. True
  24. 3
  25. 6
  26. Yes
  27. a code editor
  28. bullets
  29. <a>
  30. <ol>
  31. answers page requests
  32. in the head
  33. <h6>
  34. Rain today
  35. as one space
  36. True
  37. a slash /
  38. 2
  39. an opening tag
  40. The full moon

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