← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 539 · 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 of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <a>
  2. 2.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <h2>Fun facts</h2>
    <p>My best friend</p>
  5. 5.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  7. 7.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
  8. 8.📋 What number does the browser show next to “Jamun”?
    <ol start="5">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  9. 9.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <table> (d) <title>
  10. 10.True or false: <ul> is one item of a list. (a) True (b) False
  11. 11.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
  12. 12.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) maths.html (b) Play games (c) https://example.com (d) art.html
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
  15. 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
  16. 16.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
  18. 18.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  19. 19.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.📋 What number does the browser show next to “Litchi”?
    <ol start="9">
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  21. 21.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  23. 23.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  24. 24.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  25. 25.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u> (c) <\u> (d) <u/>
  26. 26.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    (a) My pets (b) Cricket is fun. (c) Our school trip (d) I love mangoes.
  27. 27.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
  28. 28.🔍 One closing tag is missing. Which one?
    <strong>The red kite</strong>
    <small>I love mangoes.
    <h1>Cricket is fun.</h1>
    (a) </h1> (b) </small> (c) </h3> (d) </strong>
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Kites fly high<br>Roses are red</p>
  30. 30.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) src (d) alt
  31. 31.Which of these is true of a web server? (a) shows line numbers (b) has an address bar (c) is where we type code (d) stores a website’s files
  32. 32.Which of these is a closing tag? (a) </body> (b) <h1> (c) <b> (d) <title>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  34. 34.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Our school trip (c) The red kite
  36. 36.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  37. 37.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
  38. 38.True or false: a code editor saves our .html files. (a) True (b) False
  39. 39.True or false: in <img>, width names the picture file. (a) False (b) True
  40. 40.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Our school trip (b) My best friend (c) The red kite (d) Cricket is fun.

Answer key

  1. <a>
  2. has a closing tag
  3. in the body
  4. 3
  5. <!DOCTYPE html>
  6. <h1>
  7. height
  8. 6
  9. <table>
  10. False
  11. 1
  12. https://example.com
  13. numbers
  14. 1
  15. Yes
  16. <ul>
  17. <h1>
  18. to leave notes
  19. an opening tag
  20. 11
  21. has a closing tag
  22. No
  23. <h6>
  24. No
  25. </u>
  26. Our school trip
  27. element
  28. </small>
  29. 4
  30. alt
  31. stores a website’s files
  32. </body>
  33. 2
  34. 6
  35. Our school trip
  36. No
  37. <h6>
  38. True
  39. False
  40. Cricket is fun.

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