← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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