← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 83 · 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.True or false: <hr> has a closing tag. (a) True (b) False
  2. 2.🔍 One closing tag is missing. Which one?
    <em>Hello, world!
    <p>Good morning!</p>
    <strong>Fun facts</strong>
    (a) </p> (b) </strong> (c) </em> (d) </h3>
  3. 3.🔗 Where does this link open?
    <a href="news.html">School news</a>
    (a) in a new tab (b) in the same tab
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  5. 5.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  6. 6.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Orange</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  7. 7.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) has an address bar
  8. 8.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="100">
  10. 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  11. 11.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
  12. 12.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  13. 13.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  14. 14.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) contact.html (c) https://example.com (d) Visit the site
  15. 15.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Match report (b) Art Gallery (c) We won by 5 runs. (d) body
  17. 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  18. 18.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
  19. 19.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  21. 21.💬 Does the browser show comments on the page? (a) Yes (b) No
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Kites fly high<br>Sky is blue</p>
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Mars is red. (c) All about me (d) Cricket Club
  24. 24.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  25. 25.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    (a) Good morning! (b) Cricket is fun. (c) Our school trip
  26. 26.📋 What number does the browser show next to “Orange”?
    <ol start="4">
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  27. 27.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  28. 28.Which of these has a closing tag? (a) <br> (b) <li> (c) <hr> (d) <meta>
  29. 29.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  30. 30.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  31. 31.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) art.html (c) maths.html (d) https://example.com
  32. 32.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  34. 34.Which of these goes in the head? (a) <img> (b) <p> (c) <h1> (d) <title>
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Rivers flow<br>Sky is blue</p>
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
  37. 37.True or false: <ol> is an unordered list. (a) True (b) False
  38. 38.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
  39. 39.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a paintbrush (d) a plain text editor
  40. 40.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) src (d) alt

Answer key

  1. False
  2. </em>
  3. in the same tab
  4. <h5>
  5. 6
  6. 7
  7. has an address bar
  8. <li>
  9. 100
  10. Yes
  11. 1
  12. <ul>
  13. href
  14. about.html
  15. <h2>
  16. Match report
  17. as one space
  18. <h1>
  19. <h1>
  20. A happy dog
  21. No
  22. 4
  23. Cricket Club
  24. Language
  25. Our school trip
  26. 8
  27. an attribute
  28. <li>
  29. 5
  30. on the browser tab
  31. https://example.com
  32. 3
  33. A tiger asleep
  34. <title>
  35. 4
  36. 2
  37. False
  38. 1
  39. a plain text editor
  40. alt

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