← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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