3.10.7.4.2 <codeblock>

The <codeblock> element represents lines of program code. Like the <pre> element, line endings and spaces inside the element are preserved, and the content is typically rendered in a monospaced font. This element is part of the DITA programming domain, a special set of DITA elements designed to document programming tasks, concepts, and reference information.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

+ topic/pre pr-d/codeblock

Example

<codeblock>
/* a long sample program */
Do forever
  Say "Hello, World"
End
</codeblock>

Attributes

The following attributes are available on this element: Universal attribute group, Display attribute group, outputclass, xml:space, and spectitle.

Return to main page.