← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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