code

< html‎ | elements
Jump to: navigation, search

code



Summary

The code element (<code>) specifies a fragment of computer code.


Overview Table

DOM Interface HTMLElement

Content within a code block is interpreted as computer program code. Browsers will preserve white space within this element.

Please remember that when displaying a less-than symbol that you will need to use the entity: &lg;.

Examples

This example uses the code element to display text in a font used to represent computer code, such as values or variable names.

<code>Here is some text in a small, fixed-width font.</code>

Notes

Remarks

Standards information


HTML information

{

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related pages (MSDN)

  • samp

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]