← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 831 · 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 <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  2. 2.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>My pets</h3>
    <h3>Good morning!</h3>
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!
    line 2: <u>I love mangoes.</u>
    line 3: <h2>Rain today</h2>
    (a) line 2 (b) line 3 (c) line 1
  4. 4.Which of these has a closing tag? (a) <img> (b) <input> (c) <br> (d) <h1>
  5. 5.Which of these is an opening tag? (a) </b> (b) </li> (c) <p> (d) </p>
  6. 6.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  7. 7.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  8. 8.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  9. 9.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  10. 10.True or false: <ul> lists things in any order. (a) True (b) False
  11. 11.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
  12. 12.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
  13. 13.True or false: <input> is an empty tag. (a) True (b) False
  14. 14.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  15. 15.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>My best friend</h2>
    <h3>Our school trip</h3>
  16. 16.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  17. 17.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
  18. 18.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>My best friend</p>
  21. 21.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  22. 22.Which of these has a closing tag? (a) <input> (b) <meta> (c) <title> (d) <br>
  23. 23.True or false: a web server shows pages from the web. (a) True (b) False
  24. 24.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
  25. 25.True or false: <ol> is an ordered list. (a) False (b) True
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) I like to read. (c) index.html (d) All about me
  27. 27.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  28. 28.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  29. 29.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  30. 30.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.True or false: in <img>, src sets how tall it is. (a) False (b) True
  32. 32.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) quiz.html (c) news.html (d) games.html
  33. 33.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>The red kite</h2>
    <h3>Fun facts</h3>
    <h3>Fun facts</h3>
  34. 34.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
  35. 35.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  36. 36.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  37. 37.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Fun facts (b) My pets (c) Our school trip (d) Cricket is fun.
  38. 38.True or false: in <img>, alt names the picture file. (a) True (b) False
  39. 39.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  40. 40.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>

Answer key

  1. has a closing tag
  2. 3
  3. line 1
  4. <h1>
  5. <p>
  6. False
  7. <!--
  8. <h6>
  9. href
  10. True
  11. <h1>
  12. height
  13. True
  14. in the same tab
  15. 3
  16. to describe the image
  17. src
  18. an empty tag
  19. an opening tag
  20. 4
  21. True
  22. <title>
  23. False
  24. 4
  25. True
  26. My Hobbies
  27. No
  28. 6
  29. a paragraph
  30. an opening tag
  31. False
  32. news.html
  33. 4
  34. 2
  35. has a closing tag
  36. numbers
  37. Our school trip
  38. False
  39. 1
  40. <!DOCTYPE html>

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