W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y

<CODE>...</CODE>

Description

Used for source code examples. Most browsers render this text in a monospaced font.

Note that the LISTING element is easier to use because it retains the spacing of the original text.

DTD

<!ELEMENT CODE - - (%inline;)*>
<!ATTLIST CODE
  %attrs;                              -- %coreattrs, %i18n, %events --
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

Examples

Source
A "Hello, world" program in Pascal would be :<P>
<CODE>
program Hello;<BR>
begin<BR>
write('Hello, world');<BR>
end.
</CODE>
 
Result
A "Hello, world" program in Pascal would be :

program Hello;
begin
write('Hello, world');
end.

Statistics