← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 732 · 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.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) games.html (c) quiz.html (d) news.html
  2. 2.Which of these is true of a web server? (a) saves our .html files (b) shows pages from the web (c) opens web pages for us (d) sends pages over the net
  3. 3.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  4. 4.Which of these goes in the head? (a) <ul> (b) <p> (c) <meta charset="utf-8"> (d) <h1>
  5. 5.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Hello, world!</h3>
    <h4>My pets</h4>
    <h4>Our school trip</h4>
    <p>Our school trip</p>
  6. 6.True or false: <b> has a closing tag. (a) True (b) False
  7. 7.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <p>Rain today</p>
    <h2>My pets</h2>
  8. 8.Which of these has a closing tag? (a) <h1> (b) <img> (c) <br> (d) <meta>
  9. 9.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    (a) I love mangoes. (b) The red kite (c) Hello, world!
  10. 10.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.True or false: <img> goes in the body. (a) True (b) False
  13. 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p>
  16. 16.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
  18. 18.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <h2>I love mangoes.</h2>
  19. 19.🔗 Where does this link open?
    <a href="https://example.com">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
  21. 21.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width
  24. 24.True or false: <hr> is an empty tag. (a) False (b) True
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  26. 26.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  27. 27.True or false: in <img>, src tells which image to load. (a) False (b) True
  28. 28.True or false: in <img>, height is read by screen readers. (a) True (b) False
  29. 29.Which of these is an opening tag? (a) </h1> (b) <b> (c) </body> (d) </title>
  30. 30.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
  31. 31.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  33. 33.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) All about me (c) Space Facts (d) index.html
  35. 35.Which of these goes in the head? (a) <p> (b) <table> (c) <ul> (d) <style>
  36. 36.Which of these is an opening tag? (a) </body> (b) </h1> (c) <p> (d) </p>
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  38. 38.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>The red kite</p>
    <h3>I love mangoes.</h3>
    <h3>My best friend</h3>
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) maths.html (c) Visit the site (d) art.html
  40. 40.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. news.html
  2. sends pages over the net
  3. a closing tag
  4. <meta charset="utf-8">
  5. 4
  6. True
  7. 2
  8. <h1>
  9. Hello, world!
  10. -->
  11. numbers
  12. True
  13. in the head
  14. <h1>
  15. 5
  16. in the body
  17. </head>
  18. 3
  19. in the same tab
  20. 1
  21. <img>
  22. 250
  23. A tiger asleep
  24. True
  25. 150
  26. src
  27. True
  28. False
  29. <b>
  30. Markup
  31. 2
  32. 6
  33. in a new tab
  34. Space Facts
  35. <style>
  36. <p>
  37. 2
  38. 3
  39. https://example.com
  40. in the body

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