← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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