As of 22 Nov 2025, the Markdown editor has been upgraded from v1.4.10 to v3.2.2. The toolbar, layout, icons, and editor structure remain unchanged.

How to change the color of the text in Markdown

Prev Next

The Markdown editor does not have built-in support for custom font colors, sizes, or spacing. The workaround is to use inline HTML with the <span> tag and the style attribute, which Document360 renders correctly. The <span> tag wraps the text you want to style, and the style attribute applies the CSS property directly. For example, color:red sets the text color to red.

These steps apply to the Markdown editor and to Markdown view in the unified Editor. The inline HTML renders the same way in both.

NOTE

The unified Editor is rolled out in phases and is currently available in projects created on or after November 23, 2026. Projects created earlier continue to use the Advanced WYSIWYG editor and the Markdown editor. We're working to make it available to all projects soon.


When to use inline HTML styling

These techniques are useful when you need to:

  • Highlight specific text: draw attention to a warning, a term, or a key value using color without using a callout block.
  • Match a visual style or brand guideline: apply a specific color or font size to align with your product's design language.
  • Add visual separation: use padding and a background color to make a snippet or label stand out from surrounding body text, similar to a badge or tag.

Use these sparingly. Overuse of custom colors or sizes makes articles harder to read and inconsistent across your knowledge base.

NOTE

These techniques apply to Markdown content. In the unified Editor's Block view, select the text and use Font color, Highlight color, and Font size in the toolbar, or Text color and Highlight in the bubble menu. In the Advanced WYSIWYG editor, use the Palette and Typography sections of the Formatting panel. See Text elements.


Quick reference

Use these snippets directly. Replace the placeholder text and values as needed.

Style HTML snippet
Text color <span style="color:red">Text content</span>
Font size <span style="font-size:18px">Text content</span>
Padding and background <span style="padding:10px;background-color:#f0f0f0">Text content</span>
Combined <span style="color:red;font-size:18px;padding:10px;background-color:#f0f0f0">Text content</span>

In the unified Editor's Markdown view, you can also highlight text with <mark>text</mark>.


How to apply custom text styles in Markdown

The pattern is the same for all three styles. Only the CSS property inside style="" changes.

  1. Open the desired article in the Knowledge base portal. In the unified Editor, select Markdown view (</>) in the article header.
  2. Paste the appropriate snippet from the table above at the location where you want the styled text.
  3. Replace Text content with your desired text.
  4. Replace the style values (color name, pixel value, or hex code) with your requirements.

Customizing text color

<span style="color:red">
Text content
</span>

Replace red with any valid CSS color name (for example, blue or green) or a hex code (for example, #e63946).

Markdown editor showing text rendered in red using the span style color tag.

Customizing text size

<span style="font-size:18px">
This text is larger than normal.
</span>

Replace 18px with your desired font size. Standard body text in most knowledge bases renders at 14 to 16px, so values above this will appear larger.

Markdown editor showing text rendered at a larger font size using the span style font-size tag.

Customizing text padding and background

<span style="padding:10px;background-color:#f0f0f0">
Text with padding and background.
</span>

Replace 10px with your desired padding size and #f0f0f0 with your desired background color. You can use any valid CSS color name or hex code.

Markdown editor showing text with padding and a light gray background color applied using the span style tag.