Uncommon Markdown Tricks Cheatsheet
Definition Lists
Term
: Definition here
CSS
: Cascading Style Sheets
: A language for styling HTMLTerm : Definition here
CSS : Cascading Style Sheets : A language for styling HTML
Footnotes
Here is a claim[^1] and another[^longnote].
[^1]: Short footnote.
[^longnote]: Multi-paragraph footnote.
Indent subsequent paragraphs by 4 spaces.Abbreviations
The HTML specification is maintained by the W3C.
*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web ConsortiumHover over the abbreviation and it expands (processor-dependent).
Task Lists with Indentation
- [x] Ship v1
- [ ] Write docs
- [x] API reference
- [ ] Tutorial
- [ ] Nested sub-taskCollapsed Sections (HTML <details>)
<details>
<summary>Click to expand</summary>
Any **Markdown** content here. Must have a blank line after `<summary>`.
| Column A | Column B |
|----------|----------|
| works | inside |
</details>Live example
This is hidden until clicked.
Heading IDs (Custom Anchors)
## My Section {#custom-id}
Link to it: [jump](#custom-id)Superscript / Subscript
H~2~O <!-- subscript (some processors) -->
E = mc^2^ <!-- superscript (some processors) -->
<!-- Universal fallback -->
H<sub>2</sub>O
x<sup>2</sup>Highlight / Mark
==highlighted text==
<!-- Fallback -->
<mark>highlighted text</mark>Escaping Inside Code Spans
Use double backticks to include a literal backtick:
`` `backtick` inside code ``Renders: `backtick` inside code
Multi-line Table Cells (Pipe Tables)
| Feature | Description |
|---------|-------------|
| A | Line one<br>Line two<br>Line three |Images with Title, Size, and Links

<!-- Linked image -->
[](https://example.com)
<!-- HTML for size control -->
<img src="image.png" width="300" alt="sized image">Reference-style Links (Declutter Prose)
Read the [Astro docs][astro] or the [MDX spec][mdx].
[astro]: https://docs.astro.build "Astro Documentation"
[mdx]: https://mdxjs.comYou can also use implicit labels:
Check [Astro Docs].
[Astro Docs]: https://docs.astro.buildDiff / Language-specific Code Blocks
```diff
- const old = true;
+ const updated = true;
```
```bash{3}
echo "line 1"
echo "line 2"
echo "this line is highlighted" # syntax varies by renderer
```Emoji Shortcodes
:rocket: :white_check_mark: :warning:Processor-dependent (works in GitHub, many Astro remark plugins).
Automatic Linking Suppression
`https://example.com` <!-- inside code: not linked -->
<https://example.com> <!-- explicit autolink -->
\https://example.com <!-- escaped: not linked (some parsers) -->Line Breaks Without Double Space
Line one\
Line two
<!-- or the classic trailing-two-spaces -->
Line one··
Line twoThe backslash \ is the explicit, visible way.
Blockquote Nesting and Attribution
> First level
>> Nested quote
>>> Third level
> "Design is not just what it looks like."
>
> — Steve JobsCombining HTML Attributes
When your Markdown processor supports {...} attribute syntax:
{.rounded .shadow width=400}
> A styled quote {.callout .warning}Math (KaTeX / MathJax)
Inline: $E = mc^2$
Block:
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$Requires remark-math + rehype-katex in Astro.
Table Alignment
| Left | Center | Right |
|:-----|:------:|------:|
| a | b | c |The colon position controls alignment.
Admonitions (remark-directive)
:::note
Standard note content.
:::
:::tip[Pro Tip]
Custom title admonition.
:::
:::danger
Critical warning.
:::Requires remark-directive + a handler plugin in Astro.