From Htmlpedia
Contents |
[edit]
HTML Element CODE
[edit]
Definition and Usage
The <code> tag is similar to the <pre> tag, only <code> is intended to be designated a fragment of computer code where as <pre> is designated to hold preformatted text, hence the name. Also, <code> only takes the width of the text within it and doesn't span the whole 100% whereas <pre>'s takes the full 100% unless told otherwise through the use of the width style property.
[edit]
Examples
<p>The function <code>COS (X)</code> calculate and return the Cosine of the parameter X.</p>
[edit]
Attributes
[edit]
Optional attributes
None
[edit]
Standard Attributes
id, class, title, style, dir, lang
[edit]
Event Attributes
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
[edit]
Tags in Tag
- Fontstyle
- Phrase
EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, ACRONYM
[edit]
