← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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