← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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