← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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