← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 185 · 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.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Good morning!</p> -->
  2. 2.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Link (d) Language
  4. 4.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
  5. 5.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  6. 6.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  7. 7.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) fort.jpg (b) Our school bus (c) bus.jpg (d) tiger.jpg
  8. 8.True or false: <title> goes in the head. (a) True (b) False
  9. 9.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  10. 10.🔗 Where does this link open?
    <a href="contact.html">Play games</a>
    (a) in the same tab (b) in a new tab
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  12. 12.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) My pets (c) I love mangoes. (d) Hello, world!
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Stars shine<br>Sky is blue</p>
  14. 14.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) My best friend (b) Rain today (c) Our school trip
  15. 15.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  16. 16.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  17. 17.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>My pets</h2>
  18. 18.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) </html>
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
  20. 20.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  21. 21.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Welcome! (b) Mars is red. (c) Space Facts (d) index.html
  23. 23.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  25. 25.True or false: a web browser is where we type code. (a) True (b) False
  26. 26.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  28. 28.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  29. 29.🔠 Are headings shown in bold by default? (a) No (b) Yes
  30. 30.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
  31. 31.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in the same tab (b) in a new tab
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  33. 33.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <img> (d) <p>
  34. 34.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  35. 35.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <h2>The red kite</h2>
    line 3: <b>Our school trip
    (a) line 2 (b) line 3 (c) line 1
  37. 37.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  38. 38.True or false: in <img>, src tells which image to load. (a) False (b) True
  39. 39.Which of these has a closing tag? (a) <br> (b) <hr> (c) <li> (d) <input>
  40. 40.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. 1
  2. in the body
  3. Language
  4. <h5>
  5. the body
  6. has a closing tag
  7. bus.jpg
  8. True
  9. alt
  10. in the same tab
  11. 6
  12. Fun facts
  13. 4
  14. Rain today
  15. Yes
  16. No
  17. 3
  18. </html>
  19. alt
  20. <!DOCTYPE html>
  21. a slash /
  22. Space Facts
  23. an opening tag
  24. <ol>
  25. False
  26. an opening tag
  27. bullets
  28. 3
  29. Yes
  30. </h3>
  31. in the same tab
  32. <h6>
  33. <link rel="stylesheet">
  34. False
  35. starts a new line
  36. line 3
  37. 2
  38. True
  39. <li>
  40. an empty tag

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