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