← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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