Markdown hacks
markdown
Markdown can render A LOT of characters and symbols using specific 'entities', and can do other things like render tables, so I made myself a list of common or handy, but easy-to-forget markdown hacks based off the official Markdown Guide.
Sections
Characters & Symbols
Entity | Symbol |
---|---|
© | Copyright (©) |
™ | Trademark (™) |
® | Registered trademark (®) |
↑ | Up arrow (↑) |
↓ | Down arrow (↓) |
← | Left arrow (←) |
→ | Right arrow (→) |
↰ | Up left shift arrow (↰) |
↱ | Up right shift arrow (↱) |
↲ | Down left shift arrow (↲) |
&rrsh; | Down right shift arrow (↳) |
↩ | Left hook arrow (↩) |
↪ | Right hook arrow (↪) |
↺ | Counterclockwise circle arrow (↺) |
↻ | Clockwise circle arrow (↻) |
↵ | Carriage return arrow (↵) |
&racuo; | Right pointing guillemet (») |
§ | Section (§) |
¶ | Paragraph (¶) |
π | Pi (π) |
° | Degree (°) |
€ | Euro (€) |
£ | Pound (£) |
¥ | Yen (¥) |
¹ | Superscript One (¹) |
² | Superscript Two (²) |
³ | Superscript Three (³) |
№ | Numero sign (№) |
¼ | Fraction one-quarter (¼) |
½ | Fraction one-half (½) |
¾ | Fraction three-quarters (¾) |
♀ | Female symbol (♀) |
♂ | Male symbol (♂) |
★ | Filled star (★) |
☆ | Unfilled star (☆) |
♥ | Hearts (♥) |
♠ | Spades (♠) |
♣ | Clubs (♣) |
♦ | Diamonds (♦) |
✓ | Checkmark (✓) |
✗ | Ballot X or Cross (✗) |
Δ | Delta capital letter (Δ) |
Λ | Lambda capital letter (Λ) |
Σ | Sigma capital letter (Σ) |
Φ | Phi capital letter (Φ) |
Ψ | Psi capital letter (Ψ) |
Ω | Omega capital letter (Ω) |
α | Alpha small letter (α) |
β | Beta small letter (β) |
ε | Epsilon small letter (ε) |
λ | Lambda small letter (λ) |
Creating Tables in Markdown
| Title | Description |
| --------- | ---------------------------- |
| Star Wars | In a galaxy far, far away... |
| Star Trek | Beam me up, Scotty! |
A table is rendered:
Title | Description |
---|---|
Star Wars | In a galaxy far, far away… |
Star Trek | Beam me up, Scotty! |
It’s also possible to use line breaks inside a markdown table with HTML.
| Genre | Examples |
| ------ | ---------------------- |
| Sci-Fi | Star Wars<br>Star Trek |
Table with line breaks is rendered:
Genre | Examples |
---|---|
Sci-Fi | Star Wars Star Trek |
You can also make lists inside a markdown table with HTML.
| Genre | Examples |
| ------ | ----------------------------------------------------- |
| Sci-Fi | Titles: <ul><li>Star Wars</li><li>Star Trek</li></ul> |
Table with unordered list is rendered:
Genre | Examples |
---|---|
Sci-Fi | Titles:
|
And a numbered/ordered list in markdown.
| Genre | Examples |
| ------ | ----------------------------------------------------- |
| Sci-Fi | Titles: <ul><li>Star Wars</li><li>Star Trek</li></ul> |
Table with numbered/ordered list is rendered:
Genre | Examples |
---|---|
Sci-Fi | Titles:
|
Making a Table of Contents in Markdown
This is handy for blogs! A lot of the best markdown applications can automatically generate a table of contents. Frameworks like Nuxt (with the Content module) | and Astro, among others, can make use of this.
### Table of Contents
- [Chapter 1](#ch1)
- [Chapter 2](#ch2)
- [Chapter 3](#ch3)
- [Chapter 4](#ch4)
Table of Contents
Then you just have to link these to a heading ID. Here it is using markdown.
[Chapter 1](#ch1) |
And in HTML.
<a href="#ch1">Chapter 1</a>