Last updated
Markdown Preview Examples
The Markdown Preview renders Markdown source as formatted HTML in real time. Below are examples of Markdown input and how each element renders.
Headings
Markdown source:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Rendered output: Headings display with decreasing size hierarchy, matching h1–h4 HTML elements.
Text Formatting
**Bold text** and *italic text* and ~~strikethrough~~.
`inline code` renders in monospace font.
A [link](https://example.com) and an .
Code Blocks with Syntax Highlighting
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
const message = greet('World');
console.log(message);
```
Rendered: JavaScript code block with syntax highlighting — keywords, strings, and function names in distinct colors.
```python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n - 1) + fibonacci(n - 2)
```
Tables (GitHub Flavored Markdown)
| Name | Role | Status |
|---------|-----------|---------|
| Alice | Admin | Active |
| Bob | Editor | Active |
| Carol | Viewer | Pending |
| Left | Center | Right |
|:--------|:---------:|--------:|
| text | text | text |
| 1 | 2 | 3 |
Rendered: Tables with borders, alternating row colors, and column alignment applied.
Task Lists
## Release Checklist
- [x] Write unit tests
- [x] Update documentation
- [ ] Code review
- [ ] Deploy to staging
- [ ] Deploy to production
Rendered: Interactive checkboxes — checked items show a checkmark, unchecked items show an empty box.
Blockquotes
> This is a blockquote.
> It can span multiple lines.
>
> > Nested blockquotes are also supported.
Lists
Unordered:
- Item one
- Item two
- Nested item
- Another nested item
- Item three
Ordered:
1. First step
2. Second step
1. Sub-step A
2. Sub-step B
3. Third step
Horizontal Rule and Line Breaks
Section one content.
---
Section two content after the horizontal rule.
Front Matter (YAML)
---
title: My Blog Post
date: 2026-03-18
tags: [javascript, tutorial]
author: Alice
---
# My Blog Post
Content starts here...
Rendered: Front matter displayed as a formatted metadata block or hidden from the preview depending on settings.
Footnotes
This is a statement with a footnote.[^1]
[^1]: This is the footnote content, rendered at the bottom of the document.
Rendering Differences by Platform
Switch between flavors to see differences:
CommonMark: Strict spec compliance
GitHub Flavored (GFM): Tables, task lists, strikethrough, autolinks
GitLab Flavored: GFM + math blocks, diagrams
Pandoc: Extended features for academic writing
Common Issues the Preview Catches
- Fenced code blocks missing the closing ``` — renders as plain text
- Table pipes misaligned — table doesn't render
- Nested list indentation wrong — renders as flat list
- Image path incorrect — broken image placeholder shown
- Heading with no space after # — renders as plain text on some parsers
Common Use Cases
- Previewing README files before committing to GitHub
- Verifying documentation formatting before publishing
- Checking table and code block rendering before submitting
- Comparing how the same Markdown renders on different platforms
- Exporting rendered HTML for use in a CMS or email template
Paste any Markdown into the editor and see the rendered output update in real time in the split-pane view. Export the rendered HTML when you need it for web publishing.