<code>
Example
The <html>
element wraps around the entire
document. Everything must be inside here.
The <head>
element contains metadata about the
document that the browsers can see, but is not designed for users.
The <body>
element contains what the user sees.
This is where most of the markup will be included.
Usage
<p>
The <code><html></code> element wraps around the entire
document. Everything must be inside here.
</p>
<p>
The <code><head></code> element contains metadata about the
document that the browsers can see, but is not designed for users.
</p>
<p>
The <code><body></code> element contains what the user sees.
This is where most of the markup will be included.
</p>
Description
The <code>
element contains any small piece of
computer code that is part of the main body of text. Browsers will
style this often using a monospaced font.
For larger pieces of code, such as the example above, it should be
wrapped in a <pre>
tag. This block-level element
ensures that any formatting included stays intact, such as
indentations.
One caveat to mention is that the content inside
<code>
is not inert. If the browser understands it,
it will try and parse it. The HTML tags in this example had to be
converted to use "<" and ">" instead of regular angle
brackets.