Weekly notes
- Ship the share dialog
- Write the changelog
Review on Friday.
21 topics · 46 editable examples
CommonMark, GitHub Flavored Markdown, math and diagrams. Every example is editable.
Updated
| Element | Markdown |
|---|---|
| Heading | # H1 ## H2 ### H3 |
| Bold | **bold text** |
| Italic | *italic text* |
| Strikethrough | ~~struck text~~ |
| Blockquote | > quoted text |
| Ordered list | 1. First item |
| Unordered list | - First item |
| Task list | - [x] Done |
| Inline code | `code` |
| Code block | ```js … ``` |
| Link | [title](https://example.com) |
| Element | Markdown |
|---|---|
| Image |  |
| Table | | A | B |
|---|---| |
| Footnote | Text[^1] [^1]: Note |
| Horizontal rule | --- |
| Line break | end a line with \ |
| Alert | > [!NOTE] |
| Math | $E = mc^2$ |
| Diagram | ```mermaid |
| Emoji | :rocket: |
| Escape | \*not italic\* |
| Comment | <!-- hidden --> |
CommonMark: the core syntax that works in nearly every markdown renderer.
Start a line with one to six # characters and a space. One # is the page title; use ## and below for sections.
Separate paragraphs with a blank line. A single newline is treated as a space. To force a line break, end the line with a backslash (or two spaces).
This is the first paragraph. This line joins the one above.
This is a second paragraph.
Roses are red,
violets are blue,
markdown is simple
and so are you.
Wrap text in one asterisk for italic, two for bold, and three for both. Underscores work too.
Italic or italic
Bold or bold
Bold and italic
A bold and italic mix.
Start a line with > to quote it. Quotes can span paragraphs, nest, and contain any other markdown.
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
Note: quotes can hold other blocks.
Lists
and emphasis
Even another quote.
Use -, * or + for bullets and numbers followed by . for ordered lists. Indent items to nest them under the previous one.
First step
Indent follow-up paragraphs to match the text so they stay inside the item.
Second step
Use single backticks for inline code and triple-backtick “fences” for blocks. Name the language after the opening fence to get syntax highlighting.
Run npm install and open index.html.
function greet(name) {
return `Hello, ${name}!`
}export const greet = (name: string) => `Hello, ${name}!`- const theme = "default"
+ const theme = "editorial"Put the link text in square brackets and the URL in parentheses. Add an optional title in quotes, or use reference-style links to keep paragraphs readable.
RenderMD is free.
Read the CommonMark spec and the GFM spec.
Bare URLs work in GFM: https://commonmark.org
So do emails: hello@example.com
Jump back to Headings.
Images are links with a leading !. The text in brackets becomes the alt text — describe the image for people who can’t see it.
Three or more dashes, asterisks or underscores on a line of their own make a thematic break.
Above the break.
Below the break.
Put a backslash before any markdown character to show it literally.
*Not italic* and # not a heading.
1986. A great year — not a list.
Use `backticks` without code.
GitHub’s additions to CommonMark, also supported by GitLab, VS Code, Obsidian and Reddit.
Separate columns with pipes and put a row of dashes under the header. Colons in that row align the column left, center or right.
| Planet | Moons | Day length |
|---|---|---|
| Mercury | 0 | 4,222 h |
| Earth | 1 | 24 h |
| Mars | 2 | 24.7 h |
| Syntax | Result |
|---|---|
**bold** | bold |
a | b | a | b |
| Line break | via <br> |
Add [ ] or [x] after a list bullet to make a checklist.
Wrap text in double tildes to strike it through.
The meeting is Tuesday Wednesday.
Add a reference like [^1] in the text and define it anywhere below. Footnotes are numbered automatically and collected at the end.
Markdown was created in 2004.1 It was standardised as CommonMark in 2014.2
By John Gruber, with Aaron Swartz. ↩
See https://commonmark.org. ↩
A blockquote that starts with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] or [!CAUTION] becomes a callout.
Note
Useful information worth a glance.
Tip
A better way to do something.
Important
Key information users need to know.
Warning
Urgent info that needs immediate attention.
Caution
Advises about risks or negative outcomes.
Not part of any markdown standard, but supported by GitHub, GitLab and Obsidian.
Write LaTeX between single dollar signs for inline math and double dollar signs for display equations. RenderMD typesets it with KaTeX.
Pythagoras: , and Euler: .
A code block with the language mermaid becomes a diagram: flowcharts, sequence diagrams, Gantt charts, class and state diagrams, pie charts, timelines and more.
Type an emoji shortcode between colons, or paste the emoji itself.
Ship it 🚀 Tests pass ✅ Time to celebrate 🎉
Most renderers allow a safe subset of HTML for things markdown can’t do. Leave a blank line between HTML and markdown so the markdown inside is still parsed.
Forty-two. Markdown still works in here.
Press Ctrl + C to copy, ⌘ + K for commands.
H2O, E = mc2, and a highlighted phrase.
A YAML block between --- lines at the very top of a file holds metadata such as a title, date or tags. Static site generators like Jekyll, Hugo and Astro read it.
Markdown is a lightweight way to format plain text. You write **bold** or # Heading and a renderer turns it into formatted text. John Gruber created it in 2004.
CommonMark is the formal specification of core markdown — headings, emphasis, lists, links, images, code and quotes. GitHub Flavored Markdown (GFM) is a superset that adds tables, task lists, strikethrough, autolinks and footnotes. Anything written in CommonMark also works in GFM.
End the line with a backslash (\) or two spaces. A blank line starts a new paragraph, and a single newline on its own is treated as a space.
Separate columns with | and add a line of dashes under the header row: | Name | Role | then | --- | --- |. Put colons in the dash row to align columns: :--- left, :---: center, ---: right.
Use LaTeX between dollar signs: $E = mc^2$ for inline math and $$ … $$ on their own lines for display equations. GitHub, GitLab, Obsidian and RenderMD all support this syntax.
Yes. Most renderers allow a safe subset of HTML for things markdown can’t express, like <details> for collapsible sections, <kbd> for keys and <img width="…"> for sized images. Scripts and event handlers are always removed.
Paste or drop it into RenderMD. It renders in your browser, including tables, math and diagrams, and the file is never uploaded. You can also open a URL or a GitHub repository directly.
Comments
CommonMarkHTML comments don’t appear on the rendered page. Use them for notes to yourself or other authors.
Visible text.
More visible text.