Comments inserted in HTML code.

Q4. How are comments inserted in an HTML code? Explain with example.

Ans. Comments are written inside the opening(<!) and closing tags(–>) . Any content written as a comment is not displayed by the Web browser.

For example:

<HTML>

<HEAD>

<TITLE> WELCOME TO HTML</TITLE>

</HEAD>

<BODY>

<!—   This line will be displayed as comments.   –>

Hello World.

 

</BODY>

</HTML>

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *