← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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