← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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