← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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