Markdown Cells

Text can be added to Jupyter Notebooks using Markdown cells. You can change the cell type to Markdown by using the Cell menu, the toolbar, or the key shortcut m. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here:

Markdown basics

You can make text italic or bold by surrounding a block of text with a single or double * respectively

You can build nested itemized or enumerated lists:

  • One

    • Sublist

      • This

  • Sublist - That - The other thing

  • Two

  • Sublist

  • Three

  • Sublist

Now another list:

  1. Here we go

    1. Sublist

    2. Sublist

  2. There we go

  3. Now this

You can add horizontal rules:

Here is a blockquote:


And shorthand for links:

Jupyter’s website

You can use backslash  to generate literal characters which would otherwise have special meaning in the Markdown syntax.

\*literal asterisks\*
 *literal asterisks*

Use double backslash   to generate the literal $ symbol.



# Heading 1
# Heading 2
## Heading 2.1
## Heading 2.2

Embedded code


def f(x):
    """a docstring"""
    return x**2

or other languages:

  x += 4;

LaTeX equations

Courtesy of MathJax, you can include mathematical expressions both inline: \(e^{i\pi} + 1 = 0\) and displayed:

\begin{equation} e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i \end{equation}



Expressions on their own line are surrounded by \begin{equation} and \end{equation}:


GitHub flavored markdown


print "Hello World"

console.log("Hello World")


print "Hello World"
console.log("Hello World")

And a table like this:

| This | is   |
|   a  | table|

A nice HTML Table:





General HTML


Header 1

Header 2

row 1, cell 1

row 1, cell 2

row 2, cell 1

row 2, cell 2

Local files



For example, in the images folder, we have the Python logo:

<img src="../images/python_logo.svg" />


and a video with the HTML5 video tag:

<video controls src="../images/animation.m4v">animation</video>

These do not embed the data into the notebook file, and require that the files exist when you are viewing the notebook.

Security of local files



Markdown attachments

Since Jupyter notebook version 5.0, in addition to referencing external file you can attach a file to a markdown cell. To do so drag the file from in a markdown cell while editing it:


Files are stored in cell metadata and will be automatically scrubbed at save-time if not referenced. You can recognized attached images from other files by their url that starts with attachment:. For the image above:


Keep in mind that attached files will increase the size of your notebook.

You can manually edit the attachment by using the View > Cell Toolbar > Attachment menu, but you should not need to.