← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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