|
ION Script User's Guide: ION Script Tag Reference |
|
The HTML comment tag is used to add text to an HTML document without including that text in the Web page. When used in an ION Script page, HTML comment tags and the content they enclose are passed unchanged directly to the browser.
The HTML comment tag consists of the opening tag <!-- and the closing tag -->. Text between <!-- and --> will not appear in the Web page, nor will it be evaluated by the ION Script parser:
<!-- This text will not be displayed on the Web page -->
This comment will, however, be passed in the HTML file sent to the browser, and can be seen by viewing the page source (View
Source).
Comments can be used on a single line as shown above, or can span multiple lines as follows:
<!-- This text will not be displayed on the Web page -->
Comments are used in the following ways:
<!-- <ION_EVALUATE EXPR="$A = 10"/> -->
<STYLE type="text/css"><!--
H1 {color: red;}
BODY {background: yellow;}
--></STYLE>
Similarly, because older browsers do not support scripting languages such as JavaScript and VBScript, HTML comment tags are often used inside <SCRIPT> blocks to prevent scripts from appearing as text in older browsers:
<SCRIPT TYPE="text/javascript">
<!--
document.write("Hello World");
//-->
</SCRIPT>
| Note IDL code inside an <IDL>...</IDL> block can also contain comments, but IDL comment syntax is used in this case, not the HTML comment tag. For information on using comments in IDL code, see Commenting IDL Code. |
IDL Online Help (March 06, 2007)