Complete Jupyter Notebook markdown reference. Cell formatting, LaTeX math, HTML, and magic commands explained.
All Jupyter markdown syntax at a glance.
| Feature | Syntax | Notes | |
|---|---|---|---|
| Heading H1 | # Heading | In a markdown cell | |
| Heading H2 | ## Heading | H1-H6 all supported | |
| Bold | **bold** | Double asterisks | |
| Italic | *italic* | Single asterisks | |
| Bullet list | - item | Dash, asterisk, or plus | |
| Numbered list | 1. item | Number + period | |
| Code (inline) | `code` | Single backticks | |
| Code block | ```python
code
``` | Triple backticks with language | |
| Math inline | $x^2 + y^2$ | MathJax renders LaTeX | |
| Math block | $$\int_0^\infty f(x)dx$$ | Double dollar signs for display math | |
| Image |  | Local paths or URLs | |
| HTML | <div style="color:red">text</div> | Full HTML works in markdown cells |
Jupyter has three cell types: Code, Markdown, and Raw. Switching between them changes how the cell content is interpreted.
Press M in command mode to convert a cell to markdown
This is formatted text with emphasis and inline code.
Press Y in command mode to convert to a code cell — executes on Shift+Enter
Command mode shortcuts (press Escape first, then the key)
Jupyter renders LaTeX math via MathJax in markdown cells. Both inline and display (block) math are supported.
Wrap LaTeX in single dollar signs for inline rendering
The formula x² + y² = r² defines a circle of radius r.
Double dollar signs render math centered on its own line
Frequently used math symbols in Jupyter notebooks
Jupyter passes HTML through in markdown cells, enabling custom styles, colors, and alignment that plain markdown can't do.
Use inline HTML to apply colors and custom styles
HTML alignment and table attributes work in Jupyter markdown cells
Centered paragraph text.
| Feature | Supported |
|---|---|
| Math | ✅ |
| HTML | ✅ |
Embed images using standard markdown syntax or HTML for size control. Both local paths and URLs work.
Standard markdown image syntax — uses the full available width
Use an HTML img tag to set width or height explicitly
Magic commands are IPython directives that go in code cells. They are not markdown but are often confused with it.
Single % applies to one line — must be in a code cell
Double %% applies to the entire cell — changes how it is interpreted
Markdown goes in markdown cells; magics go in code cells
Features that do not work in standard Jupyter markdown cells.
Use ipywidgets for interactive elements in notebooks
Cells don't have stable anchors — use headings for navigation
In command mode (press Escape first), press M to convert the selected cell to a markdown cell. Press Y to switch back to a code cell.
A rendered markdown cell shows formatted output. Double-click it to enter edit mode and see the raw markdown source.
Press Shift+Enter to render the current markdown cell and move to the next cell. Ctrl+Enter renders in place without moving.
Jupyter renders HTML in markdown cells, so you can create collapsible sections using the native <details> and <summary> tags.
<details> <summary>Click to expand</summary> Hidden content here. </details>
Everything you need to know.
Jupyter has three cell types: Code cells run executable code (Python, R, Julia, etc.) and display output below. Markdown cells render formatted text, math, and HTML. Raw cells pass content through unprocessed — useful for nbconvert templates. Switch between them with M (markdown), Y (code), or R (raw) in command mode.
Export markdown to a clean HTML page — perfect for sharing Jupyter analysis without requiring Python.