← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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