HTML: Comments


If you are involved in writing a Web page of a reasonable size then it might be useful to annotate the X/HTML code so that you are reminded as to what section of the code does what. Text inserted as a “comment” is not displayed on the viewing screen and is only visible when the source code of the Web page is viewed.

To add a comment to the X/HTML code we use the following X/HTML tags:

Should appear at the beginning of any comment
Should appear after the comment.

For example:

<!-- The following shows the use of the header tag -->
<h3>Example Header</h3>
<!-- The following shows the use of the paragraph  tag -->
<p>This is a small paragraph.</p>
In HTML with comments are not displayed by the browser,but they can help document your HTML source code.with comments you can place notifications and reminders in your HTML.the following simple syntax of comments in HTML.


<!-- This is Simple Comment in This Document -->
<p>This is sample paragraph used with <p> tag.</p>
   The Veewom is largest tutorials and educational website on the internet.

Comment tags are used to insert comments in the HTML source code.

Related Articles


Leave a Reply

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

Check Also

Back to top button