← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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