Markdown was designed to be converted to HTML. John Gruber's original spec defined Markdown as a writing format for the web — a way to write HTML without writing HTML. Understanding exactly how each Markdown element maps to HTML output helps you write Markdown that converts cleanly and produces semantic, well-structured pages.
| Markdown | HTML output | Notes |
|---|---|---|
# Heading 1 | <h1>Heading 1</h1> | One # per heading level, up to ###### |
**bold** | <strong>bold</strong> | Also works with __double underscore__ |
*italic* | <em>italic</em> | Also works with _single underscore_ |
`code` | <code>code</code> | Inline code — backtick delimited |
[link](url) | <a href="url">link</a> | Title attribute: [link](url "title") |
 | <img src="src" alt="alt"> | Images use same syntax as links with ! |
- item | <ul><li>item</li></ul> | Also * or + as bullet character |
1. item | <ol><li>item</li></ol> | Numbers don't need to be sequential |
> quote | <blockquote>quote</blockquote> | Nestable with multiple > characters |
--- | <hr> | Three or more dashes, asterisks, or underscores |
| Blank line between paragraphs | <p>...</p> | Single line breaks don't create new paragraphs |
Fenced code blocks use triple backticks and produce <pre><code> output. Adding a language identifier after the opening backticks enables syntax highlighting in renderers that support it:
A language identifier like ```javascript or ```python becomes a class="language-javascript" attribute on the <code> element, which syntax highlighting libraries like Prism.js or highlight.js use to apply coloring.
Standard CommonMark doesn't include tables, but GitHub Flavored Markdown (GFM) does. Table syntax uses pipe characters to separate columns and dashes for the header separator row:
Tables produce standard <table>, <thead>, <tbody>, <tr>, <th>, and <td> elements. Column alignment is set using colons in the separator row: :--- for left, :---: for center, ---: for right.
Raw HTML in Markdown. Most Markdown parsers pass raw HTML through unchanged. This is intentional — it lets you embed HTML where Markdown falls short. However, some parsers strip or escape it for security. Know your parser's behavior before relying on inline HTML.
Nested lists. Indentation rules for nested lists vary between parsers. CommonMark requires exactly 4 spaces or 1 tab. GitHub uses 2 spaces. When in doubt, use 4 spaces and test the output.
Line breaks. A single line break in Markdown does not produce a <br> in HTML. To force a line break, end a line with two spaces before the newline, or use a backslash at the end of the line (GFM extension).
Drop your .md file into the Documents panel and select HTML as the output format. The conversion handles all standard CommonMark syntax and outputs clean, semantic HTML that you can embed directly in any web page.