Plans supporting customization of text in articles
Professional | Business | Enterprise |
---|---|---|
Achieving center alignment in your article is simple with the 'Align center' option in the toolbar of the WYSIWYG editor.
In the Markdown editor, all text defaults to left alignment. Markdown doesn't have a built-in way to center align the text. You can use the HTML tags provided in this article as a workaround to achieve this effect.
Center align text in Markdown
Go to the desired article in the Knowledge base portal.
Paste the below code in the desired location where you want the text to appear.
<p style="text-align:center;">Text_content</p>
Replace the 'Text_content' with your desired text.
For example:
<p style="text-align:center;">Sample text with center alignment</p>
The output would be as below
Sample text with center alignment
NOTE
You can add the basic text formatting such as bold, italic, and strikethrough using the usual syntax for the entire code.
For example,
***<p style="text-align:center;">Text with basic formatting applied</p>***
Output:
Text with basic formatting applied
If you want the text to be right aligned, use the following code.
<p style="text-align:right;">Text_content</p>
Center align Headings in Markdown
You can also center-align Headings in your article by slightly altering the HTML code snippet.
Replace the <p>...</p>
with <h2>...</h2>
, <h3>...</h3>
, or <h4>...</h4>
.
For example, to center align a H3
<h3 style="text-align:center;">H3 that is center aligned</h3>
Output:
H3 that is center aligned
NOTE
Markdown doesn't have a built-in way to center align text. You can use the HTML tags provided in this article as a workaround within Markdown to achieve this effect.