← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 920 · 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.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  2. 2.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  3. 3.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) Contact us (c) href (d) About us
  4. 4.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) quiz.html (b) href (c) Art corner (d) Maths fun
  5. 5.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <h2>The red kite</h2>
    <p>Our school trip</p>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) fort.jpg (b) An old fort (c) A tiger asleep (d) width
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  8. 8.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>My pets</h2>
    <h4>I love mangoes.</h4>
    <h4>Hello, world!</h4>
    <p>The red kite</p>
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing</p>
  10. 10.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) High Tech (c) Home Text (d) Hot Tags
  11. 11.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  12. 12.🔍 One closing tag is missing. Which one?
    <strong>Good morning!</strong>
    <h1>My pets
    <i>Cricket is fun.</i>
    (a) </strong> (b) </i> (c) </h1> (d) </b>
  13. 13.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) href (d) quiz.html
  14. 14.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) Birthday cake (b) moon.png (c) dog.jpg (d) cake.jpg
  15. 15.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p>
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) Space Facts (c) body (d) Mars is red.
  18. 18.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  19. 19.Which of these is a closing tag? (a) <b> (b) <body> (c) </h1> (d) <h1>
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  21. 21.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
  22. 22.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  24. 24.📋 What number does the browser show next to “Grapes”?
    <ol start="7">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  25. 25.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  26. 26.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
  27. 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  28. 28.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) <u> (d) </u>
  29. 29.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  30. 30.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  31. 31.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <style>
  32. 32.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  33. 33.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) news.html (d) href
  34. 34.🔗 Where does this link open?
    <a href="maths.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  35. 35.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p/> (c) </p> (d) <p>
  36. 36.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
  37. 37.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  38. 38.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) Play games (c) About us (d) games.html
  39. 39.📋 What number does the browser show next to “Grapes”?
    <ol start="6">
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  40. 40.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>

Answer key

  1. bullets
  2. opens it in a new tab
  3. About us
  4. Maths fun
  5. 4
  6. An old fort
  7. 50
  8. 4
  9. 2
  10. HyperText
  11. dog.jpg
  12. </h1>
  13. Contact us
  14. cake.jpg
  15. No
  16. 5
  17. Match report
  18. False
  19. </h1>
  20. 3
  21. a code editor
  22. in the head
  23. bullets
  24. 10
  25. to leave notes
  26. 2
  27. No
  28. </u>
  29. No
  30. <ul>
  31. <h1>
  32. 2
  33. Visit the site
  34. in the same tab
  35. </p>
  36. </b>
  37. <a href="about.html">
  38. Play games
  39. 7
  40. 5

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