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 add borders to an image in Markdown

Prev Next

The Markdown editor does not have a built-in way to add borders to images. The workaround is to use the HTML <img> tag with the border CSS property inside the style attribute, which Document360 renders correctly.

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 image borders

  • Screenshots with white or light backgrounds: a border creates a visible edge between the image and the page, preventing the image from blending into the background.
  • UI screenshots or diagrams: a thin border gives the image a clean, contained appearance, which works well for technical documentation.
  • Grouping or emphasis: a border visually separates an image from surrounding content and signals that it is a distinct element worth examining.

Use borders sparingly. Applying them to every image reduces their effect and can make articles feel cluttered.

NOTE

This technique applies to Markdown content. In the unified Editor's Block view, click the image and select Border options in its bubble menu instead. In the Advanced WYSIWYG editor, use the Bordered style in the image menu.


Understanding the border property

The border CSS shorthand sets three values in this order:

Value What it controls Example
Width Thickness of the border line 2px
Style Appearance of the border line solid, dashed, dotted
Color Color of the border, as any CSS color name or hex code grey, #000000

Quick reference

Replace YOUR_IMAGE_URL, YOUR_ALT_TEXT, and the border values with your requirements.

<img src="YOUR_IMAGE_URL" alt="YOUR_ALT_TEXT" style="border: 2px solid grey;">

To customize the border, adjust the width, style, and color:

<!-- Thicker black border -->
<img src="YOUR_IMAGE_URL" alt="YOUR_ALT_TEXT" style="border: 4px solid black;">

<!-- Dashed blue border -->
<img src="YOUR_IMAGE_URL" alt="YOUR_ALT_TEXT" style="border: 2px dashed blue;">
NOTE

Grey is one of the most commonly used border colors alongside black, as it works well against both light and dark backgrounds. Replace grey with any valid CSS color name (for example, blue, green, or yellow) or a hex code to match your design.


How to add a border to an image in Markdown

  1. Open the desired article in the Knowledge base portal. In the unified Editor, select Markdown view (</>) in the article header.
  2. Paste the snippet below at the location where you want the image to appear.
<img src="YOUR_IMAGE_URL" alt="YOUR_ALT_TEXT" style="border: 2px solid grey;">
  1. Replace YOUR_IMAGE_URL with the URL of your image.
  2. Replace YOUR_ALT_TEXT with a short description of the image for accessibility.
  3. Adjust the border width, style, and color as needed. See the border property reference table above.

Outcome

Without border

Screenshot of a health check metrics dashboard without a border applied.

With border

Screenshot of a health check metrics dashboard with a 2-pixel solid grey border applied.

NOTE

You can combine a border with a shadow on the same image using both CSS properties in the style attribute. See How to add shadows to an image in Markdown for the shadow syntax.