← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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