← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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