← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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