← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 363 · 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.🖼️ 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
  2. 2.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  4. 4.True or false: <b> is an empty tag. (a) True (b) False
  5. 5.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) bus.jpg (b) The full moon (c) fort.jpg (d) moon.png
  6. 6.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  7. 7.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    (a) I love mangoes. (b) My pets (c) Good morning!
  8. 8.Which of these is an opening tag? (a) </h1> (b) </title> (c) </b> (d) <p>
  9. 9.Which of these is true of a web server? (a) has an address bar (b) hosts websites online (c) opens web pages for us (d) shows line numbers
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high</p>
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Cricket is fun.</strong>
    <h2>My pets</h2>
    <em>Fun facts
    (a) </strong> (b) </b> (c) </em> (d) </h2>
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  13. 13.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) href (b) https://example.com (c) About us (d) Play games
  14. 14.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) My pets (b) Our school trip (c) Cricket is fun.
  15. 15.True or false: in <img>, height sets how tall it is. (a) False (b) True
  16. 16.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  17. 17.True or false: in <img>, width shows if the image fails. (a) False (b) True
  18. 18.True or false: HTML on its own can pick a random number. (a) True (b) False
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red<br>Rivers flow</p>
  20. 20.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  21. 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  22. 22.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.📋 What number does the browser show next to “Jamun”?
    <ol start="9">
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  24. 24.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
  25. 25.True or false: HTML on its own can keep a high score. (a) False (b) True
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Planets (b) body (c) Mars is red. (d) Art Gallery
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  28. 28.🔠 Are headings shown in bold by default? (a) Yes (b) No
  29. 29.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <b> (d) <title>
  30. 30.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Rain today</p>
  31. 31.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
  32. 32.🔍 One closing tag is missing. Which one?
    <strong>The red kite</strong>
    <h1>Hello, world!
    <p>Fun facts</p>
    (a) </small> (b) </h1> (c) </strong> (d) </p>
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
  34. 34.Which of these is a closing tag? (a) <b> (b) <li> (c) <title> (d) </li>
  35. 35.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  36. 36.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
  37. 37.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  38. 38.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  39. 39.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>

Answer key

  1. to describe the image
  2. in the same tab
  3. 2
  4. False
  5. moon.png
  6. <h6>
  7. I love mangoes.
  8. <p>
  9. hosts websites online
  10. 2
  11. </em>
  12. bullets
  13. Play games
  14. Our school trip
  15. True
  16. <img>
  17. False
  18. False
  19. 4
  20. a closing tag
  21. <ul>
  22. an empty tag
  23. 12
  24. <h1>
  25. False
  26. Planets
  27. A tiger asleep
  28. Yes
  29. </h1>
  30. 3
  31. <
  32. </h1>
  33. alt
  34. </li>
  35. an attribute
  36. </h2>
  37. a code editor
  38. 1
  39. <h5>
  40. <h1>

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