← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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