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