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.
<!-- The following shows the use of the header tag -->
<!-- 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.
<html> <head> <title>Paragraphs</title> </head> <body> <!-- This is Simple Comment in This Document --> <p>This is sample paragraph used with <p> tag.</p> <p> The Veewom is largest tutorials and educational website on the internet. </p> </body> </html>Comment tags are used to insert comments in the HTML source code.