← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 884 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) The full moon (b) dog.jpg (c) width (d) A happy dog
  2. 2.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  3. 3.True or false: <hr> has a closing tag. (a) False (b) True
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) The full moon (b) dog.jpg (c) width (d) A happy dog
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  6. 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  7. 7.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg
  8. 8.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
  9. 9.📋 What number does the browser show next to “Grapes”?
    <ol start="9">
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  10. 10.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) news.html (b) games.html (c) About us (d) quiz.html
  12. 12.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
  13. 13.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Hello, world! (b) Cricket is fun. (c) I love mangoes.
  14. 14.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <p>The red kite</p>
  15. 15.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
  16. 16.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  17. 17.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) I love mangoes. (c) The red kite
  18. 18.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
  20. 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.Which of these has a closing tag? (a) <img> (b) <br> (c) <hr> (d) <ul>
  22. 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
  27. 27.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) quiz.html (b) Art corner (c) School news (d) href
  28. 28.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  29. 29.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  31. 31.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Good morning! (b) I love mangoes. (c) Hello, world!
  33. 33.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  34. 34.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
  35. 35.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>My pets</p>
    <h2>The red kite</h2>
    <h2>Cricket is fun.</h2>
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  37. 37.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  38. 38.🖼️ 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
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
  40. 40.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body

Answer key

  1. A happy dog
  2. a code editor
  3. False
  4. A happy dog
  5. 2
  6. No
  7. map.png
  8. <h2>
  9. 10
  10. a closing tag
  11. news.html
  12. 3
  13. Cricket is fun.
  14. 2
  15. <h6>
  16. Yes
  17. I love mangoes.
  18. <h6>
  19. 1
  20. an empty tag
  21. <ul>
  22. has a closing tag
  23. 6
  24. bullets
  25. 2
  26. <h6>
  27. Art corner
  28. 2
  29. <h4>
  30. 100
  31. in the head
  32. I love mangoes.
  33. <
  34. <h1>
  35. 3
  36. 2
  37. in a new tab
  38. to describe the image
  39. 2
  40. the body

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