← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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