<codeblock>
A code block is a set of lines from a program.
Rendering expectations
Processors SHOULD preserve line the breaks and spaces
that are present in the content of a <codeblock>
element.
The content of the <codeblock>
element is typically
rendered in a monospaced font.
Specialization hierarchy
The <codeblock>
element is specialized from <pre>
. It is
defined in the programming domain module.
Attributes
The following attributes are available on this element: display
attributes, universal
attributes, and @xml:space
.
Example
The following code sample shows how the <codeblock>
element can be
used to tag an excerpt from the code for a program:
<codeblock>
/* a long sample program */
Do forever
Say "Hello, World"
End
</codeblock>