← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 648 · 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: HTML on its own cannot add up two numbers. (a) True (b) False
  2. 2.Which of these is an opening tag? (a) </b> (b) <title> (c) </li> (d) </title>
  3. 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  4. 4.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  5. 5.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg
  7. 7.True or false: a code editor is where we type code. (a) False (b) True
  8. 8.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="150">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  10. 10.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    (a) Rain today (b) Fun facts (c) The red kite (d) Cricket is fun.
  11. 11.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
  12. 12.True or false: in <img>, src describes the picture. (a) True (b) False
  13. 13.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <p>Hello, world!</p>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing</p>
  15. 15.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  17. 17.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  18. 18.True or false: a code editor has an address bar. (a) True (b) False
  19. 19.🔗 Where does this link open?
    <a href="about.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  20. 20.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) cake.jpg (b) dog.jpg (c) Birthday cake (d) moon.png
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) Rain today (b) Our school trip (c) Fun facts
  22. 22.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  23. 23.Which of these is true of a code editor? (a) shows pages from the web (b) has an address bar (c) saves our .html files (d) stores a website’s files
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  26. 26.Which of these is a closing tag? (a) <h1> (b) <body> (c) </b> (d) <b>
  27. 27.True or false: in <img>, alt tells which image to load. (a) False (b) True
  28. 28.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <p>Cricket is fun.</p>
  30. 30.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.True or false: <ol> lists steps in order. (a) False (b) True
  32. 32.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  33. 33.True or false: a web server sends pages over the net. (a) True (b) False
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
  35. 35.Which of these is an empty tag? (a) <title> (b) <b> (c) <br> (d) <ul>
  36. 36.True or false: a code editor shows pages from the web. (a) False (b) True
  37. 37.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    (a) The red kite (b) My pets (c) I love mangoes.
  38. 38.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
  40. 40.True or false: in <img>, width sets how wide it is. (a) False (b) True

Answer key

  1. True
  2. <title>
  3. No
  4. <ol>
  5. in a new tab
  6. Birthday cake
  7. True
  8. <h4>
  9. The full moon
  10. Cricket is fun.
  11. 6
  12. False
  13. 3
  14. 4
  15. in the body
  16. <h6>
  17. True
  18. False
  19. in a new tab
  20. cake.jpg
  21. Rain today
  22. a web server
  23. saves our .html files
  24. 2
  25. 1
  26. </b>
  27. False
  28. <h6>
  29. 2
  30. an opening tag
  31. True
  32. 6
  33. True
  34. 6
  35. <br>
  36. False
  37. I love mangoes.
  38. a closing tag
  39. <h5>
  40. True

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