← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 579 · 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.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  2. 2.True or false: <li> goes inside ul or ol. (a) True (b) False
  3. 3.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </title>
  4. 4.📋 What number does the browser show next to “Mango”?
    <ol start="2">
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  5. 5.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <h2>My pets</h2>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <p>Good morning!</p>
  6. 6.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  7. 7.True or false: <table> goes in the body. (a) True (b) False
  8. 8.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  11. 11.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  12. 12.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  13. 13.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <ul>
  14. 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  15. 15.True or false: a web browser opens web pages for us. (a) True (b) False
  16. 16.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  17. 17.True or false: HTML on its own can count button clicks. (a) True (b) False
  18. 18.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
  19. 19.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) games.html
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  21. 21.💬 Does the browser show comments on the page? (a) Yes (b) No
  22. 22.True or false: <ol> is one item of a list. (a) True (b) False
  23. 23.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <strong>Hello, world!</strong>
    <h3>My best friend
    (a) </u> (b) </h3> (c) </strong> (d) </h2>
  24. 24.True or false: <title> goes in the body. (a) True (b) False
  25. 25.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
  26. 26.True or false: a code editor colours code to help us. (a) True (b) False
  27. 27.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
  28. 28.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
  29. 29.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
  30. 30.🔍 One closing tag is missing. Which one?
    <h3>My best friend</h3>
    <small>Rain today</small>
    <b>Hello, world!
    (a) </small> (b) </h1> (c) </h3> (d) </b>
  31. 31.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  32. 32.True or false: <ul> goes in the body. (a) True (b) False
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  34. 34.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  35. 35.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  36. 36.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  37. 37.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) alt (d) height
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) map.png (b) Birthday cake (c) width (d) Map of India
  40. 40.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a music player (d) a web browser

Answer key

  1. has a closing tag
  2. True
  3. <li>
  4. 3
  5. 4
  6. an attribute
  7. True
  8. 3
  9. 6
  10. 250
  11. opens it in a new tab
  12. 3
  13. <ul>
  14. in the head
  15. True
  16. href
  17. False
  18. 3
  19. Contact us
  20. 1
  21. No
  22. False
  23. </h3>
  24. False
  25. 3
  26. True
  27. 6
  28. colours code to help us
  29. <h1>
  30. </b>
  31. False
  32. True
  33. <h6>
  34. <!--
  35. Yes
  36. a code editor
  37. in the body
  38. height
  39. Map of India
  40. a web browser

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