← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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