← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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