← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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