The <codeblock> element represents lines of program code. Like the <pre> element, line endings and spaces inside the element must be 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.
topic (technical content), map (technical content), concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap |
( text data or boolean or cite or keyword or apiname or option or parmname or cmdname or msgnum or varname or wintitle or ph or b or i or sup or sub or tt or u or codeph or synph or filepath or msgph or systemoutput or userinput or menucascade or uicontrol or q or term or abbreviated-form or xref or state or coderef or data or data-about or foreign or unknown or draft-comment or fn or indextermref or indexterm or required-cleanup) (any number) |
<codeblock> /* a long sample program */ Do forever Say "Hello, World" End </codeblock>
The specialized title attribute allows architects of specialized types to define a fixed or default title for a specialized element. Not intended for direct use by authors. |
||||
A set of related attributes, described in 3.4.1.1 display-atts attribute group |
||||
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) |
A set of related attributes, described in 3.4.1.3 univ-atts attribute group |
|||
A set of related attributes, described in 3.4.1.2 global-atts attribute group |
||||
Common attributes described in 3.4.1.9 Other common DITA attributes |