Marking up computer code
suggest changeVersions
[{“Name”:“2.0”,“GroupName”:null},{“Name”:“3.2”,“GroupName”:null},{“Name”:“4.0”,“GroupName”:null},{“Name”:“5”,“GroupName”:null}]
Syntax
<pre>Formatted text</pre>
<code>Inline Code</code>
Remarks
The code
element should be used for any kind of “string that a computer would recognize” (HTML5), for example:
- source code
- terms from markup/programming languages (element names, function names, etc.)
- file names
Related elements
For variables, the var
element can be used.
For computer output, the samp
element can be used.
For user input, the kbd
element can be used.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents