← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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