Identifying programming code

The codeblock and codeph elements are used to identify code snippets.

Examples of programming, scripting, or mark-up language code are marked up using the code phrase (codeph) and code block (codeblock) elements. As the element names suggest, code phrase is used when the code sample occurs inline within a paragraph or other block element, while code block is used when the code is more than one line long, and is a block in its own right.

Code block elements can be nested inside a paragraph (or other block element).

If you have text that introduces the codeblock and more text that immediately explains the code, you can use a structure such as in the following example:
<p>
  If you display debugging information, such as in:
  <codeblock>
    debugText = app.name & app.ver
    debug.print("Value is " & debugText)
  </codeblock>
  you must launch the application in debugging mode.
</p>

Line breaks can be used inside codeblock elements.