TAG:  code

<code> ... </code>
Available in versions: 2.0, 3.2, 4.0
Browser compatibility: Explorer 4, 5  Netscape 4, 6
 
The <code> tag is designed to display computer code in a special font, usually in a mono spaced font style. However, the exact appearance will be browser dependent. You may still need to use various HTML tags, such as br and p, to create a presentation and appearance to suit your needs.
 
An HTML code example cannot use the HTML delimiters < and >, because they will be executed by the browser as real HTML code. Rather you must substitute a &lt; for the < and a &gt; for the >.
 
Usually, the display font appearance for the code, kbd, samp, and tt tags is the same. The listing tag has been deprecated.
 
The pre tag is more commonly used to display code.
 
The closing tag is mandatory.
 
Core Attributes
 
class    dir    id    lang    onclick    ondblclick    onkeydown    onkeypress    onkeyup    onmousedown    onmousemove    onmouseout    onmouseover    onmouseup    style    title
 
Attributes
 
None.
 
Code:
<code>
if (document.getElementById) blnDOM = true;<br>
else if (document.layers) blnNN4 = true;<br>
else if (document.all) blnIE4 = true;<br>
</code>

 
Output:
if (document.getElementById) blnDOM = true;
else if (document.layers) blnNN4 = true;
else if (document.all) blnIE4 = true;


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information