<code> Description:
The <code></code> tag indicates that the enclosed text is computer code.
<code> Web Browser Support:
- Netscape 2, 3, 4, 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 2, 3, 4, 5, 6
- Opera 3, 4, 5, 6, 7, 8
- Safari 1
- WebTV / MSNTV
- AvantGo Palm OS
- AvantGo Windows CE
- HTML 3.2, 4.0
- XHTML 1.0
Text Module
<code> Attributes:
- class (optional)
- dir (optional)
- id (optional)
- lang (optional)
- onclick (optional)
- ondblclick (optional)
- onkeydown (optional)
- onkeypress (optional)
- onkeyup (optional)
- onmousedown (optional)
- onmouseout (optional)
- onmouseover (optional)
- onmouseup (optional)
- style (optional)
- title (optional)
<code> End Tag:
</code> REQUIRED<code> Contents:
Usually HTML text. The following tags are valid within the <code> tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
<code> Valid Context:
The <code> tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var
<code> Usage:
- standard code example
An HTML header:<br />
<code> <html><br />
<head><br />
<title>Title</title><br />
</head> </code>
<code> Special Notes:
- Most browsers display the code tag in a monospace font.
- Future browsers might do more to define the code, such as indenting functions, and so on.

