← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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