← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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