← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 608 · 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 heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) Map of India (b) width (c) Birthday cake (d) map.png
  3. 3.True or false: in <img>, height sets how tall it is. (a) True (b) False
  4. 4.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  5. 5.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <b>My pets</b>
    <h3>My best friend
    (a) </h1> (b) </h3> (c) </b> (d) </small>
  6. 6.Which of these is true of a web server? (a) opens web pages for us (b) has an address bar (c) sends pages over the net (d) shows pages from the web
  7. 7.📋 What number does the browser show next to “Litchi”?
    <ol start="5">
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  8. 8.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  9. 9.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) </head>
  11. 11.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  12. 12.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) Fun facts (b) I love mangoes. (c) Rain today
  13. 13.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  14. 14.Which of these is an empty tag? (a) <h1> (b) <li> (c) <ul> (d) <meta>
  15. 15.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Kites fly high<br>Sky is blue<br>Stars shine</p>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <em>Good morning!</em>
    line 3: <b>The red kite
    (a) line 1 (b) line 2 (c) line 3
  18. 18.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  19. 19.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  20. 20.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) games.html (b) Contact us (c) Visit the site (d) href
  21. 21.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <em>My pets</em>
    line 2: <u>The red kite
    line 3: <strong>Good morning!</strong>
    (a) line 3 (b) line 2 (c) line 1
  23. 23.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) about.html (b) https://example.com (c) contact.html (d) Contact us
  24. 24.True or false: in <img>, height sets how wide it is. (a) True (b) False
  25. 25.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Our school trip (c) Hello, world!
  26. 26.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  27. 27.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    (a) Cricket is fun. (b) Hello, world! (c) The red kite
  28. 28.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  29. 29.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  30. 30.Which of these is an opening tag? (a) </p> (b) </title> (c) </body> (d) <title>
  31. 31.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  32. 32.📋 What number does the browser show next to “Jamun”?
    <ol start="5">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  33. 33.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  35. 35.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  37. 37.Which of these is a closing tag? (a) </body> (b) <h1> (c) <li> (d) <p>
  38. 38.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) maths.html (b) https://example.com (c) Play games (d) art.html
  40. 40.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>

Answer key

  1. <h6>
  2. Map of India
  3. True
  4. True
  5. </h3>
  6. sends pages over the net
  7. 6
  8. <h1>
  9. an opening tag
  10. <!DOCTYPE html>
  11. True
  12. I love mangoes.
  13. 2
  14. <meta>
  15. 2
  16. 5
  17. line 3
  18. False
  19. <ol>
  20. Contact us
  21. No
  22. line 2
  23. about.html
  24. False
  25. Hello, world!
  26. in a new tab
  27. The red kite
  28. <ul>
  29. element
  30. <title>
  31. a web browser
  32. 6
  33. <h1>
  34. Birthday cake
  35. a closing tag
  36. href
  37. </body>
  38. Yes
  39. https://example.com
  40. -->

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