← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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