← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 132 · 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: <ul> shows bullet points. (a) True (b) False
  2. 2.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  3. 3.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
  4. 4.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  5. 5.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Our school trip (b) Fun facts (c) Hello, world!
  6. 6.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  7. 7.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <h1> (d) <\h1>
  8. 8.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  10. 10.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) alt (d) height
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  13. 13.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
  14. 14.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) art.html (b) quiz.html (c) Play games (d) news.html
  15. 15.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!</h3>
    line 2: <i>My best friend
    line 3: <b>Rain today</b>
    (a) line 3 (b) line 1 (c) line 2
  17. 17.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) My best friend (c) Fun facts
  19. 19.📄 Can HTML on its own make tables? (a) Yes (b) No
  20. 20.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    (a) My best friend (b) Our school trip (c) The red kite (d) My pets
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  22. 22.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  24. 24.🔗 Which address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) quiz.html (b) Take the quiz (c) news.html (d) art.html
  25. 25.True or false: <br> is an empty tag. (a) True (b) False
  26. 26.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  27. 27.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  28. 28.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Good morning! (c) Rain today (d) Fun facts
  29. 29.True or false: <ul> lists steps in order. (a) True (b) False
  30. 30.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!</h3>
    line 2: <i>Cricket is fun.</i>
    line 3: <b>I love mangoes.
    (a) line 3 (b) line 1 (c) line 2
  32. 32.Which of these is true of a web browser? (a) hosts websites online (b) answers page requests (c) opens web pages for us (d) sends pages over the net
  33. 33.True or false: <style> goes in the head. (a) False (b) True
  34. 34.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  35. 35.Which of these is true of a web server? (a) has an address bar (b) opens web pages for us (c) sends pages over the net (d) shows line numbers
  36. 36.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) colours code to help us (d) has an address bar
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing</p>
  39. 39.True or false: <ul> goes inside ul or ol. (a) False (b) True
  40. 40.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) High Tech (d) Hot Tags

Answer key

  1. True
  2. an empty tag
  3. 1
  4. <h2>
  5. Hello, world!
  6. <!DOCTYPE html>
  7. </h1>
  8. </u>
  9. 200
  10. <h6>
  11. alt
  12. 1
  13. <h1>
  14. art.html
  15. <ul>
  16. line 2
  17. <ul>
  18. My best friend
  19. Yes
  20. My best friend
  21. A red kite
  22. <a>
  23. 5
  24. art.html
  25. True
  26. in a new tab
  27. <ol>
  28. Rain today
  29. False
  30. <!--
  31. line 3
  32. opens web pages for us
  33. True
  34. 2
  35. sends pages over the net
  36. has an address bar
  37. <h1>
  38. 3
  39. False
  40. HyperText

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