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