← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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