← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 262 · 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 BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  2. 2.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <h3>I love mangoes.</h3>
    <h3>My pets</h3>
  3. 3.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  4. 4.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  5. 5.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h2>
  6. 6.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  7. 7.Which of these is true of a code editor? (a) stores a website’s files (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
  8. 8.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.Which of these goes in the head? (a) <a> (b) <title> (c) <h1> (d) <p>
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  11. 11.Which of these goes in the body? (a) <style> (b) <title> (c) <a> (d) <meta charset="utf-8">
  12. 12.🔍 One closing tag is missing. Which one?
    <b>Hello, world!
    <h3>Fun facts</h3>
    <strong>I love mangoes.</strong>
    (a) </b> (b) </i> (c) </strong> (d) </h3>
  13. 13.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h4>
  14. 14.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  15. 15.🔍 One closing tag is missing. Which one?
    <u>Hello, world!</u>
    <h3>The red kite</h3>
    <i>Good morning!
    (a) </h3> (b) </i> (c) </u> (d) </em>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
  19. 19.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  20. 20.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
  21. 21.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) Good morning! (c) Rain today (d) My best friend
  22. 22.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  23. 23.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h6>
  24. 24.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  25. 25.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  26. 26.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in a new tab (b) in the same tab
  27. 27.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  28. 28.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts
    line 2: <em>Our school trip</em>
    line 3: <i>My pets</i>
    (a) line 1 (b) line 2 (c) line 3
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  31. 31.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  32. 32.Which of these is true of a web browser? (a) shows pages from the web (b) hosts websites online (c) answers page requests (d) colours code to help us
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width
  34. 34.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
  35. 35.Which of these is an opening tag? (a) </h1> (b) <title> (c) </title> (d) </p>
  36. 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  39. 39.🔍 One closing tag is missing. Which one?
    <h3>Good morning!</h3>
    <h2>Rain today</h2>
    <i>The red kite
    (a) </i> (b) </h2> (c) </h3> (d) </h1>
  40. 40.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False

Answer key

  1. <h1>
  2. 3
  3. <ul>
  4. <a href="about.html">
  5. <h6>
  6. <ul>
  7. colours code to help us
  8. in the body
  9. <title>
  10. 3
  11. <a>
  12. </b>
  13. <h6>
  14. 5
  15. </i>
  16. 4
  17. 4
  18. src
  19. False
  20. 3
  21. Rain today
  22. 3
  23. <h1>
  24. <a>
  25. opens it in a new tab
  26. in the same tab
  27. <h1>
  28. <ol>
  29. line 1
  30. 4
  31. kite.png
  32. shows pages from the web
  33. A tiger asleep
  34. <!--
  35. <title>
  36. has a closing tag
  37. <!DOCTYPE html>
  38. 150
  39. </i>
  40. True

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