← HTML comments lesson New set →

HTML Worksheet: Comments

HTML and CSS lesson 9: HTML comments · Set 621 · 40 questions
TalentJR

Code tip (Hidden notes): A comment is <!-- note -->: it starts with <!-- and ends with -->. Anything inside a comment, even a whole <p>, is not shown. Comments can be read with “view source” — never put secrets in them.

NameDateTime takenScore ___ / 40
  1. 1.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) Fun facts (b) Rain today (c) The red kite (d) Our school trip
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) Our school trip (b) My best friend (c) Cricket is fun.
  3. 3.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) My pets (c) Cricket is fun. (d) The red kite
  4. 4.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Good morning! (b) My pets (c) I love mangoes. (d) Fun facts
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
    (a) The red kite (b) Cricket is fun. (c) My best friend
  7. 7.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  8. 8.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    (a) Our school trip (b) Fun facts (c) Rain today (d) Hello, world!
  9. 9.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Hello, world! (b) I love mangoes. (c) Fun facts
  10. 10.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) My best friend (d) Rain today
  11. 11.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
  12. 12.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    (a) Good morning! (b) I love mangoes. (c) Hello, world!
  13. 13.💬 Does the browser show comments on the page? (a) No (b) Yes
  14. 14.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    (a) The red kite (b) Cricket is fun. (c) My best friend
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Fun facts (c) Hello, world!
  16. 16.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    (a) Cricket is fun. (b) Hello, world! (c) Good morning! (d) Fun facts
  17. 17.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
    (a) Rain today (b) My best friend (c) The red kite
  20. 20.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
  21. 21.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
  23. 23.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  24. 24.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
  25. 25.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) My best friend (c) The red kite
  26. 26.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    (a) Good morning! (b) The red kite (c) My pets (d) Cricket is fun.
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Cricket is fun. (c) Hello, world! (d) I love mangoes.
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
  29. 29.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
  30. 30.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    (a) Cricket is fun. (b) Good morning! (c) My best friend
  31. 31.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Our school trip (c) The red kite (d) Hello, world!
  34. 34.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Our school trip</p>
    (a) Cricket is fun. (b) Our school trip (c) Hello, world! (d) My pets
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
  40. 40.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    (a) Rain today (b) Our school trip (c) Hello, world! (d) Fun facts

Answer key

  1. Our school trip
  2. Cricket is fun.
  3. My pets
  4. I love mangoes.
  5. 2
  6. Cricket is fun.
  7. Yes
  8. Rain today
  9. I love mangoes.
  10. My best friend
  11. 1
  12. Hello, world!
  13. No
  14. Cricket is fun.
  15. Hello, world!
  16. Fun facts
  17. to leave notes
  18. 1
  19. Rain today
  20. 3
  21. 1
  22. 2
  23. <!--
  24. 3
  25. Rain today
  26. The red kite
  27. Hello, world!
  28. 1
  29. 2
  30. Cricket is fun.
  31. 2
  32. 1
  33. Hello, world!
  34. -->
  35. 3
  36. Cricket is fun.
  37. 1
  38. 1
  39. 2
  40. Rain today

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