← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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