← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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