← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 748 · 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: <table> goes in the body. (a) True (b) False
  2. 2.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>I love mangoes.</h4>
    <p>My pets</p>
    <p>My pets</p>
    <h4>Hello, world!</h4>
  4. 4.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    (a) Rain today (b) Our school trip (c) Fun facts
  5. 5.True or false: <title> goes in the body. (a) False (b) True
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Kites fly high<br>Birds sing</p>
  7. 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Kites fly high<br>Birds sing<br>Roses are red</p>
  9. 9.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  10. 10.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) shows line numbers (d) is where we type code
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Stars shine</p>
  12. 12.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  13. 13.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  14. 14.True or false: HTML on its own can add up two numbers. (a) False (b) True
  15. 15.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Birthday cake (b) map.png (c) Map of India (d) width
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  18. 18.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  20. 20.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  21. 21.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) shows line numbers (d) shows pages from the web
  23. 23.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  25. 25.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    (a) Hello, world! (b) Rain today (c) Fun facts (d) Good morning!
  26. 26.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) maths.html (b) contact.html (c) Visit the site (d) https://example.com
  28. 28.True or false: a web server shows line numbers. (a) False (b) True
  29. 29.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) Good morning! (c) My best friend
  30. 30.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <style> (d) <ul>
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  33. 33.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  34. 34.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  35. 35.True or false: <title> has a closing tag. (a) False (b) True
  36. 36.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) My pets (b) Fun facts (c) The red kite (d) My best friend
  37. 37.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>Fun facts</h4>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>My best friend</p>
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  39. 39.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  40. 40.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>

Answer key

  1. True
  2. an opening tag
  3. 3
  4. Our school trip
  5. False
  6. 4
  7. No
  8. 5
  9. No
  10. stores a website’s files
  11. 4
  12. a web browser
  13. <!DOCTYPE html>
  14. False
  15. in a new tab
  16. Map of India
  17. 1
  18. an opening tag
  19. alt
  20. <ol>
  21. has a closing tag
  22. answers page requests
  23. to leave notes
  24. <h1>
  25. Fun facts
  26. False
  27. contact.html
  28. False
  29. My best friend
  30. <ul>
  31. 5
  32. <h1>
  33. 6
  34. <h1>
  35. True
  36. My pets
  37. 2
  38. Yes
  39. in a new tab
  40. <h1>

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