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