← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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