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