Notes

This topic contains examples of DITA note types and styling edge cases for Portal and PDF testing. These examples test note styling, icons, spacing, nested content, inline formatting, code blocks, lists, tables, and image rendering inside note elements.

The three groupings below are not part of the DITA specification, but are an editorial convention applied here to make it easier to scan for shared default styling and escalating semantic weight. DITA defines these twelve @type values as a flat, unranked list.

Default Note <note>

Note: This is a <note> element without any special attribute applied.

Informational Notes (@type)

These types carry no implied risk; the reader can skip the contents without missing anything needed to complete the task. Loosely modeled on the "Note" and "Tip" tier of GitHub's documentation style guide.

Note: This is a <note> element with a type="other" attribute applied, but no @othertype attribute set. With @othertype unset, the note falls back to the generic "Note" label.
Custom Label: This is a <note> element with type="other" and othertype="Custom Label" attributes applied. The @othertype attribute lets you define a custom note label when none of the built-in @type values fit.
Remember: This is a <note> element with a type="remember" attribute applied. Don't forget to do what this note says. It may be a recap/reminder of something already established, not new critical info.
Tip: This is a <note> element with a type="tip" attribute applied. This is a fine little tip.
Fastpath: This is a <note> element with a type="fastpath" attribute applied. This tip is a faster route that will speed you on your way, but is optional to take.

Advisory Notes (@type)

These types ask the reader to do or avoid something, rather than just providing background. Skipping one can cause wasted effort or a failed step. Loosely modeled on the "Important" tier of GitHub's documentation style guide.

Attention: This is a <note> element with a type="attention" attribute applied. Please pay extra attention to this note.
Trouble: This is a <note> element with a type="trouble" attribute applied. Provides information about how to remedy a trouble situation.
Restriction: This is a <note> element with a type="restriction" attribute applied. You can't do what this note says.
Important: This is a <note> element with a type="important" attribute applied. This note is important and required to succeed in the task.

Hazard Notes (@type)

Unlike the two groupings above, the order of these types align with the ANSI Z535 signal words, which DITA cites directly as the basis for these four @type values. The same four values also apply to <hazardstatement>, a related but distinct element built for ANSI/ISO-compliant hazard messages. See Hazard Statement Domain Elements to learn more.

Note: This is a <note> element with a type="notice" attribute applied. Indicates a potential situation which, if not avoided, might result in an undesirable result or state.
CAUTION: This is a <note> element with a type="caution" attribute applied. Care is required when proceeding.
Warning: This is a <note> element with a type="warning" attribute applied. Indicates a potentially hazardous situation.
DANGER: This is a <note> element with a type="danger" attribute applied. Important! Be aware of this before doing anything else.

Testing for Longer Notes

Note:

This note contains multiple block elements.

  • Bullet list item one
  • Bullet list item two
  • Bullet list item three

Inline formatting: bold, italic, underline, and codeph.

Note:

Codeblock testing:

XML
<topic id="sample-topic">
    <title>Sample Topic</title>
</topic>
Note:

Table rendering inside a note:

Setting Value
Environment Production
Status Active
Note: In this note, all text is inline; no <p> elements are used. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Note: In this note, the first line is not wrapped in a <p> element. All subsequent lines are.

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.

Note:

In this note, all lines (including the first one) are wrapped in a <p> element.

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.

Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.