Can organizations create custom styles for DITA output?

Organizations can create custom styles for DITA output to tailor the formatting and visual appearance of their published content. Custom styles allow them to align the output with their brand guidelines and design preferences.

Custom Styles in DITA Output:

Definition: Custom styles in DITA output refer to specialized formatting rules and visual properties that organizations define to achieve a unique and consistent appearance in their published documents. These styles are typically implemented using stylesheets, which can be XSLT (Extensible Stylesheet Language Transformations) or CSS (Cascading Style Sheets) files.

Importance: Custom styles are essential for organizations to maintain their brand identity, design standards, and visual consistency across various documents. They allow for a personalized and recognizable look and feel in the output.

Customization: Organizations can customize various elements, such as fonts, font sizes, colors, line spacing, margins, and more. Custom styles may also define specific formatting for elements like headings, lists, tables, notes, and code blocks.

Adaptation to Output Formats: Custom styles can be tailored to different output formats. For example, styles for a PDF document might differ from those for a web-based HTML page, ensuring that content is optimized for each medium.

Creation of Custom Styles:

Stylesheet Development: Custom styles are developed within stylesheets. In the case of DITA, this often involves XSLT stylesheets for PDF output or CSS for HTML-based output.

Selectors and Declarations: In the stylesheets, selectors identify the elements or classes of elements to be styled. Declarations specify the formatting properties, such as font, size, color, or margins. For example, a selector might target all paragraph text, and its declaration could set the font to Arial, size to 12pt, and color to black.


A software company creates product documentation in DITA. To maintain a consistent brand identity, they’ve developed custom styles in their stylesheets:

Heading Styles: They’ve defined specific font choices, font sizes, and text colors for various heading levels. For example, top-level headings (H1) are styled with a bold, larger font in the company’s brand color.

Lists: They’ve customized the bullet points or numbering styles for both ordered and unordered lists, ensuring they match the brand’s design. For example, bullet points might use the company’s logo instead of traditional dots.

Tables: Custom styles for tables include defining the cell border styles, background colors, and fonts within the table.

Notes: Styles for note elements, like warnings or tips, are customized with different colors and icons to make them visually distinct.

Code Blocks: Custom code block styles determine the font, background color, and spacing for code snippets, aligning them with the company’s design.

Output Consistency: When content is processed using these custom styles, it consistently reflects the organization’s branding and design preferences across different documents and output formats.