_emailmd_

Markdown

All the standard and extended markdown syntax emailmd supports.

emailmd supports standard markdown plus several extensions. This page covers the features that aren't covered by their own dedicated docs pages (buttons, images, tables, emoji, and directives).

Text Formatting

Standard inline formatting works as expected:

**Bold text** and *italic text* and ***bold italic***.

~~Strikethrough~~ for deleted content.

`inline code` renders with a subtle background.

Headings

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

Headings are styled with the theme's headingColor.

[Visit our site](https://example.com)

Autolinks work too: https://example.com

Links are styled with the theme's brandColor.

Lists

Ordered and unordered lists:

- First item
- Second item
- Third item

1. Step one
2. Step two
3. Step three

Task Lists

- [x] Design approved
- [x] Content written
- [ ] Ready to send

Task lists render with checkboxes: checked items show a filled box, unchecked items an empty one.

Blockquotes

> "The best way to predict the future is to create it."
>
> — Peter Drucker

Blockquotes are styled with a left border in your theme's brandColor.

Code Blocks

Fenced code blocks render with a theme-aware background:

```
const greeting = "Hello, world!";
console.log(greeting);
```

The background uses the theme's cardColor with rounded corners and comfortable padding.

Syntax Highlighting

Name a language on the fence and the code is syntax-highlighted with email-safe markup, no external stylesheets or scripts:

```ts
const greeting: string = "Hello, world!";
```

Supported languages (aliases in parentheses): JavaScript (js, jsx), TypeScript (ts, tsx), HTML/XML (html), CSS, JSON, YAML (yml), Bash (sh), Shell (console), Python (py), Go, Rust (rs), Java, C# (cs), PHP, Ruby (rb), SQL, and Diff.

Token colors adapt to the theme: a dark card_color gets a light-on-dark palette automatically, and theme: auto emails switch palettes with the reader's dark mode. Unknown languages (or fences with no language) render as plain code, so omitting the language is the opt-out.

Definition Lists

emailmd
: A markdown-to-email library.

MJML
: The framework that powers emailmd's HTML output.

Highlighted Text

Use ==double equals== to highlight text with a colored background:

Don't miss our ==biggest sale of the year==!

The highlight uses your theme's brandColor at reduced opacity.

Subscript & Superscript

H~2~O is water.

E = mc^2^ is famous.

~text~ renders as subscript, ^text^ renders as superscript.

Horizontal Rules

A horizontal rule creates a visual separator between sections:

Thanks for reading!

---

*The Acme Team*

On this page