← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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