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