← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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