code element | code object
[This documentation is preliminary and is subject to change.]
Specifies a code sample.
![]() ![]() |
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
- HTML 4.01 Specification, Section 9.2.1
HTML information
| Closing Tag | required |
|---|---|
| CSS Display | inline |
DOM Information
Inheritance Hierarchy
Node
code
Element
code
Remarks
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>
See also
Build date: 3/8/2012

