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

Doctype Content model
topic (base) desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo
map (base), classifyMap, subjectScheme, learningBookmap, learningMap desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry
topic (technical content) desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, pd
map (technical content), bookmap desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, pd
concept desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, conbody, pd
ditabase desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, conbody, prereq, context, steps-informal, stepsection, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, refsyn, proptypehd, propvaluehd, propdeschd, propdesc, glossdef, glossUsage, glossScopeNote, pd
glossary, glossentry, glossgroup desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, conbody, glossdef, glossUsage, glossScopeNote, pd
reference desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, refsyn, proptypehd, propvaluehd, propdeschd, propdesc, pd
task (strict), task (general) desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, prereq, context, steps-informal, stepsection, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, pd
machineryTask desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, prereq, context, steps-informal, stepsection, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, reqcond, reqcontp, personnel, perscat, perskill, esttime, supequi, supply, spare, safecond
learningAssessment, learningOverview, learningSummary desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, lcIntro, lcAudience, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, lcInteractionBase, lcInstructornote
learningContent desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, lcIntro, lcAudience, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, prereq, context, steps-informal, stepsection, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, conbody, refsyn, proptypehd, propvaluehd, propdeschd, propdesc, lcInteractionBase, lcInstructornote
learningPlan desc, p, note, lq, li, itemgroup, dd, fig, figgroup, stentry, draft-comment, fn, entry, abstract, body, bodydiv, section, sectiondiv, example, linkinfo, lcIntro, lcAudience, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, lcClient, lcPlanTitle, lcCIN, lcModDate, lcDelivDate, lcPlanSubject, lcPlanDescrip, lcPlanPrereqs, lcGeneralDescription, lcGoals, lcNeeds, lcValues, lcOrgConstraints, lcEdLevel, lcAge, lcBackground, lcSkills, lcKnowledge, lcMotivation, lcSpecChars, lcWorkEnvDescription, lcPlanResources, lcProcesses, lcTaskItem, lcAttitude, lcPlanObjective, lcJtaItem, lcGapItemDelta, lcLearnStrat, lcAssessment, lcDelivery, lcLMS, lcNoLMS, lcHandouts, lcClassroom, lcOJT, lcConstraints, lcW3C, lcPlayers, lcGraphics, lcViewers, lcResolution, lcFileSizeLimitations, lcDownloadTime, lcSecurity, lcInteractionBase, lcInstructornote

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

Was this helpful?