|
|
HTML <code> tag
Syntax
<code> - </code>
Definition and Usage
The CODE element denotes computer code.
Visual browsers typically render CODE as
monospaced text, but authors can suggest a rendering using style sheets. Since CODE
is a structural element, it carries meaning, making it preferable to
font style elements such as TT
when marking up computer code.
Standard Attributes
| id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard
Attributes.
Event Attributes
| onclick, ondblclick, onmousedown, onmouseup, onmouseover,
onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
Example
| Source |
Output |
This is a <CODE>code </CODE>text. |
This is a code text.
|
|
|