← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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