Inline Text Semantics
The <code> element represents a fragment of computer code, like an XML element name, a file name, a computer program, or any other text that a computer would recognize.
Attributes for <code>
Type | Attribute List |
'Standard' Attributes | (none) |
New HTML5 Attributes | "writingsuggestions" |
Examples for "code"Description | Example |
How it renders | This is how your browser renders "code" with our stylesheet (this text is in a <code> element). |
Notes
- There is no formal way to specify the language of the computer code being marked up, but the class attribute can be used to specify a class with a prefix of "language-", like class="language-cpp", class="language-html", class="language-javascript", class="language-pascal", etc.
Recommended Links
Search Engine Links (for more information)