Jupyter Markdown Guide
Complete Jupyter Notebook markdown reference. Cell formatting, LaTeX math, HTML, and magic commands explained.
Quick Reference
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 |
Cell Types
Jupyter has three cell types: Code, Markdown, and Raw. Switching between them changes how the cell content is interpreted.
Markdown Cell
Press M in command mode to convert a cell to markdown
Section Title
This is formatted text with emphasis and inline code.
- Item 1
- Item 2
Code Cell
Press Y in command mode to convert to a code cell — executes on Shift+Enter
Keyboard Shortcuts for Cell Types
Command mode shortcuts (press Escape first, then the key)
Math & LaTeX
Jupyter renders LaTeX math via MathJax in markdown cells. Both inline and display (block) math are supported.
Inline Math
Wrap LaTeX in single dollar signs for inline rendering
The formula x² + y² = r² defines a circle of radius r.
Display Math Block
Double dollar signs render math centered on its own line
Common LaTeX Symbols
Frequently used math symbols in Jupyter notebooks
HTML in Markdown Cells
Jupyter passes HTML through in markdown cells, enabling custom styles, colors, and alignment that plain markdown can't do.
Colored and Styled Text
Use inline HTML to apply colors and custom styles
Centered Content and Custom Tables
HTML alignment and table attributes work in Jupyter markdown cells
Centered Heading
Centered paragraph text.
| Feature | Supported |
|---|---|
| Math | ✅ |
| HTML | ✅ |
Images & Media
Embed images using standard markdown syntax or HTML for size control. Both local paths and URLs work.
Markdown Image
Standard markdown image syntax — uses the full available width
./figures/scatter.png
HTML img Tag for Size Control
Use an HTML img tag to set width or height explicitly
Use width attribute to control display size
Magic Commands vs Markdown
Magic commands are IPython directives that go in code cells. They are not markdown but are often confused with it.
Line Magics (%)
Single % applies to one line — must be in a code cell
Cell Magics (%%) — Render as HTML or LaTeX
Double %% applies to the entire cell — changes how it is interpreted
HTML cell
\n\n%%latex\n\\begin{"{"}equation{"}"}\n E = mc^2\n\\end{"{"}equation{"}"}Markdown vs Magic — Key Difference
Markdown goes in markdown cells; magics go in code cells
Standard markdown
LaTeX math
HTML tags
Python/R/Julia code
% line magics
%% cell magics
Unsupported in Jupyter Markdown
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
Pro Tips
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>
Frequently asked questions
Everything you need to know.
What types of cells does Jupyter support?
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.
Need to convert your notebook output?
Export markdown to a clean HTML page — perfect for sharing Jupyter analysis without requiring Python.