← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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