David Hellyer Sign out Sign in

Fenced divs

Wrap content in named CSS classes using ::: syntax.

Fenced divs

The ::: syntax wraps content in a <div> with a CSS class name. Use it to create callouts, warnings, sidebars, or any styled block without writing raw HTML.

Syntax

::: classname
Content here. Markdown is processed normally inside the block.
:::

Example

::: warning
This operation cannot be undone. Back up your data first.
:::

Renders as:

<div class="warning">
<p>This operation cannot be undone. Back up your data first.</p>
</div>

Class name validation

Class names must start with a word character and contain only word characters (a-z, A-Z, 0-9, _) and hyphens. Names that contain other characters are rejected and the content is rendered without a wrapper. Examples:

Notes