← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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