← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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