← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 66 · 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: <table> goes in the body. (a) False (b) True
  2. 2.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) The red kite (b) I love mangoes. (c) Hello, world! (d) Good morning!
  3. 3.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h3>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
  4. 4.True or false: <li> has a closing tag. (a) False (b) True
  5. 5.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  6. 6.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    (a) I love mangoes. (b) My pets (c) Good morning!
  7. 7.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  8. 8.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <h2>Rain today</h2>
    <h1>Our school trip
    (a) </h2> (b) </u> (c) </h3> (d) </h1>
  9. 9.True or false: in <img>, alt describes the picture. (a) True (b) False
  10. 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  11. 11.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
  12. 12.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  13. 13.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  14. 14.True or false: in <img>, height is read by screen readers. (a) False (b) True
  15. 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  16. 16.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) has an address bar (d) is where we type code
  17. 17.Which of these is true of a web browser? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) turns HTML into a page
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high</p>
  19. 19.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  20. 20.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  21. 21.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <style>
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  23. 23.True or false: <p> goes in the head. (a) False (b) True
  24. 24.True or false: HTML on its own can count button clicks. (a) True (b) False
  25. 25.True or false: <title> goes in the head. (a) True (b) False
  26. 26.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) map.png (b) kite.png (c) A red kite (d) cake.jpg
  27. 27.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  28. 28.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.Which of these goes in the head? (a) <a> (b) <style> (c) <ul> (d) <img>
  30. 30.Which of these is true of a web browser? (a) hosts websites online (b) is where we type code (c) colours code to help us (d) opens web pages for us
  31. 31.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  32. 32.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  34. 34.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <i>The red kite</i>
    line 2: <b>Hello, world!
    line 3: <h3>Fun facts</h3>
    (a) line 3 (b) line 1 (c) line 2
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  37. 37.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <h4>The red kite</h4>
  38. 38.True or false: HTML on its own can keep a high score. (a) False (b) True
  39. 39.True or false: a code editor shows line numbers. (a) True (b) False
  40. 40.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <br>

Answer key

  1. True
  2. Good morning!
  3. <h6>
  4. True
  5. a paragraph
  6. My pets
  7. as one space
  8. </h1>
  9. True
  10. <li>
  11. element
  12. 1
  13. -->
  14. False
  15. Markup
  16. stores a website’s files
  17. turns HTML into a page
  18. 2
  19. opens it in a new tab
  20. <h1>
  21. <h1>
  22. A red kite
  23. False
  24. False
  25. True
  26. kite.png
  27. width
  28. a closing tag
  29. <style>
  30. opens web pages for us
  31. numbers
  32. in the same tab
  33. numbers
  34. <ul>
  35. line 2
  36. bullets
  37. 2
  38. False
  39. True
  40. <p>

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