← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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