How to change the color of the text in Markdown?

Prev Next

Plans supporting customization of text in articles

Professional
Business
Enterprise






Markdown doesn't have a built-in way to customize the font size, colors and spacing. You can use the HTML tags provided in this article as a workaround to achieve this effect.

Customizing text color

To change the color of a text in the Markdown editor,

  1. Navigate to the desired article in the Knowledge base portal.

  2. Use the below HTML code snippet:

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

NOTE

The <span> tag is an HTML element, and the style attribute is used to apply inline CSS for styling, in this case, setting the text color to red. Markdown does not natively support custom inline styles (like text color) without extensions.

  1. Replace “Text content” with your desired text.

  2. Replace the color as per your requirements.

Outcome

Image showing font color change in Markdown


Customizing text size

To change the size of a text in the Markdown editor,

  1. Navigate to the desired article in the Knowledge base portal.

  2. Use the below code snippet:

<span style="font-size:18px">
This text is larger than normal.
</span>
  1. Replace “This text is larger than normal.” with your desired text.

  2. Replace the font size as per your requirements.

Outcome

Image showing large size font


Customizing text padding and background

To set text padding and background,

  1. Navigate to the desired article in the Knowledge base portal.

  2. Use the below code snippet:

<span style="padding:10px;background-color:#f0f0f0"> 
Text with padding and background.
</span>
  1. Replace “Text with padding and background.” with your desired text.

  2. Replace the padding pixel and the background color as per your requirements.

Outcome

Image showing text with padding and background in Markdown editor