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