← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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