← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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