← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 827 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Welcome! (c) body (d) Class 7 Blog
  2. 2.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  3. 3.True or false: <ul> goes in the head. (a) True (b) False
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
  5. 5.True or false: <ol> lists steps in order. (a) True (b) False
  6. 6.🔍 One closing tag is missing. Which one?
    <strong>Rain today
    <p>Good morning!</p>
    <small>I love mangoes.</small>
    (a) </p> (b) </small> (c) </em> (d) </strong>
  7. 7.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .txt (d) .html
  8. 8.🔢 In a basic web page file, which comes first: “</html>” or “<head>”? (a) </html> (b) <head>
  9. 9.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>The red kite</p>
    <h3>The red kite</h3>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine</p>
  11. 11.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  12. 12.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  13. 13.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  14. 14.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h2>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  15. 15.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
  16. 16.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
  18. 18.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <ul>
  19. 19.🔠 Are headings shown in bold by default? (a) Yes (b) No
  20. 20.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  21. 21.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) at the bottom (d) nowhere
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  23. 23.True or false: a web browser shows pages from the web. (a) True (b) False
  24. 24.True or false: in <img>, alt tells which image to load. (a) False (b) True
  25. 25.True or false: in <img>, src names the picture file. (a) False (b) True
  26. 26.True or false: <table> goes in the head. (a) False (b) True
  27. 27.True or false: a code editor opens web pages for us. (a) True (b) False
  28. 28.True or false: HTML on its own can add up two numbers. (a) True (b) False
  29. 29.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  30. 30.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  31. 31.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  32. 32.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) Maths fun (c) quiz.html (d) Art corner
  33. 33.💬 Does the browser show comments on the page? (a) No (b) Yes
  34. 34.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
  35. 35.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) Play games (b) news.html (c) quiz.html (d) games.html
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Kites fly high</p>
  37. 37.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  39. 39.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Litchi</li>
    </ul>
  40. 40.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <strong> (d) <\strong>

Answer key

  1. Welcome!
  2. <ol>
  3. False
  4. 2
  5. True
  6. </strong>
  7. .html
  8. <head>
  9. 2
  10. 5
  11. <li>
  12. Yes
  13. 6
  14. <h1>
  15. to describe the image
  16. <h6>
  17. 1
  18. <ul>
  19. Yes
  20. a paragraph
  21. on the browser tab
  22. numbers
  23. True
  24. False
  25. True
  26. False
  27. False
  28. False
  29. <h6>
  30. </h1>
  31. to leave notes
  32. Maths fun
  33. No
  34. </u>
  35. news.html
  36. 4
  37. in a new tab
  38. Yes
  39. 2
  40. </strong>

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