Markdown for Jupyter
This guide covers the most useful Markdown commands to make your Jupyter notebooks clear and structured. You can also jump to the summary cheat sheet.
Headings
Use # for titles and section headers.
Output:
Heading 1
Heading 2
Heading 3
Heading 4
Text Formatting
| Style | Markdown | Output |
|---|---|---|
| Italic | *text* or _text_ |
text |
| Bold | **text** or __text__ |
text |
| Bold + Italic | ***text*** |
text |
Inline code |
`code` |
code |
~~text~~ |
Links and Images
Link:
Image:
Lists
Unordered list:
Output:
- Item 1
- Item 2
- Subitem 2.1
Ordered list:
Output:
- Step one
- Step two
- Substep
Blockquotes
Output:
This is a quote.
Code Blocks
For multi-line code with syntax highlighting:
Output:
Mathematical Equations (LaTeX)
Jupyter supports LaTeX syntax for math.
Inline math:
Output:
\[ E = mc^2\ \]
Display math:
Output:
\[ \int_a^b f(x)\,dx = F(b) - F(a) \]
Subscript and Superscript (LaTeX)
Use LaTeX math mode for clean subscripts and superscripts.
Output:
- Subscript: $ H_2O $
- Superscript: $ x^2 $
- Combined: $ x_i^2 $
Tables
Output:
| Name | Age | Country |
|---|---|---|
| Alice | 25 | USA |
| Bob | 30 | UK |
Horizontal Line
Output:
Task Lists
Output:
Quick Reference Table
| Feature | Markdown Syntax | Example |
|---|---|---|
| Heading | #, ##, ### |
## Title |
| Bold | **text** |
text |
| Italic | *text* |
text |
| Code | `code` |
print() |
| Code block | ```python ... ``` |
multi-line code |
| List | - or 1. |
bullet or numbered list |
| Link | [title](url) |
Data Science Course |
| Image |  |
image |
| Math | $...$ or $$...$$ |
formulas |
| Subscript/Superscript | $H_2O$, $x^2$ |
( H_2O ), ( x^2 ) |
| Table | | col | col | |
formatted table |
| Quote | > |
blockquote |
| Line | --- |
horizontal line |