← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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