The HTML <code></code> element renders the selected text so that it will appear to be different than other text. This tag is mainly used to show what tags to use or how to use them, but they don't remove the text effects. That is, if the text is bold and you use this tag, it will still be bold. So the best way is to use &lt; to represent <, and &gt; to represent >. That way, the entire code sequence will be shown.


Global Attributes

See Global HTML Attributes.

To apply this in an HTML document, on <span> for example, use:

<code>&amp;lt;span&amp;gt;Text text text&amp;lt;/span&amp;gt;</code>

which will generate: <span>Text text text</span>

Image example:

<code>&amp;lt;code&amp;gt;</code> example


Code Element

<code> in Firefox 3.6.10

See Also

External Links