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