pre
The preformatted element (<pre>)
preserves line breaks and spaces entered manually by the author in
the content of the element, and also presents the content in a monospaced
type font (depending on your output formatting processor). Do not
use <pre> when a more semantically specific
element is appropriate, such as <codeblock>.
Contains
note
These models represent only the default document types distributed by OASIS.
Actual content models will differ with each new document type.
Doctype | Content model |
---|---|
topic (base), map (base), classifyMap, subjectScheme, learningAssessment, learningBookmap, learningContent, learningMap, learningOverview, learningPlan, learningSummary | ( text data or boolean or cite or keyword or ph or b or i or sup or sub or tt or u or q or term or tm or xref or state or data or data-about or foreign or unknown or draft-comment or fn or indextermref or indexterm or required-cleanup) (any number) |
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 tm or xref or state or data or data-about or foreign or unknown or draft-comment or fn or indextermref or indexterm or required-cleanup) (any number) |
machineryTask | ( text data or boolean or cite or keyword or wintitle or ph or b or i or sup or sub or tt or u or menucascade or uicontrol or q or term or tm or xref or state or data or data-about or foreign or unknown or draft-comment or fn or indextermref or indexterm or required-cleanup) (any number) |
Contained by
Inheritance
- topic/pre
Example
The following example will preserve all line breaks.
<pre> MEMO: programming team fun day Remember to bring a kite, softball glove, or other favorite outdoor accessory to tomorrow's fun day outing at Zilker Park. Volunteers needed for the dunking booth. </pre>
The rendered result will differ depending on the processor that is rendering your DITA content. It will generally look something like this:
MEMO: programming team fun day Remember to bring a kite, softball glove, or other favorite outdoor accessory to tomorrow's fun day outing at Zilker Park. Volunteers needed for the dunking booth.
Attributes
Name | Description | Data Type | Default Value | Required? |
---|---|---|---|---|
spectitle | 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. | CDATA | #IMPLIED | No |
display-atts attribute group (scale, frame, expanse) | A set of related attributes, described in display-atts attribute group | |||
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) | A set of related attributes, described in univ-atts attribute group | |||
global-atts attribute group (xtrf, xtrc) | A set of related attributes, described in global-atts attribute group | |||
class, outputclass, xml:space | Common attributes described in Other common DITA attributes |