Page 83 - CA_165_V2.0_Flipbook
P. 83
COMMENTS
Comments are used to add remarks to the programs created in any language. The comments are not
executed by the compilers or browsers of the programs but are displayed in the source programs as they
are. They provide additional information about the program. Comment can also be written in an HTML
document. It is viewed only in source code of HTML.
The main reason to include the comments in HTML is that it helps the new user or reader to understand
the use of HTML codes in a document.
Comments must start with <!-- and end with -->. Anything written between these tags will not be displayed
in the browser. It can be viewed only in source program with the added information. It is not mandatory
to specify comments in an HTML document. The syntax for using comments in HTML is as follows:
<!-- REMARKS CAN BE ADDED HERE -->
For example:
1. <!-- This comment is given by Mr. Albert -->
2. <!-- This program displays the information about Orange Education, India -->
3. <!-- This code will change the background colour and font colour -->
The following HTML code uses the <COMMENTS> tag for documenting code:
<!-- This Program is Developed by ORANGE EDUCATION -->
<HTML>
<HEAD>
<TITLE>Example of comments</TITLE>
</HEAD>
<BODY BGCOLOR ="LIGHTBLUE" TEXT = "Maroon">
HTML is not a Programming Language like C, C++, JAVA, etc.
</BODY>
</HTML>
The output of the preceding HTML code is as follows:
Introduction to HTML 81

