Skip to content

Markdown cells

igaurab edited this page Nov 18, 2026 · 2 revisions

A markdown cell shows rendered text (headings, lists, code, links) instead of an editor, and it never runs.

  • Make one: ctrl+n for a new cell, then escape escape (cell mode; one escape with --no-vim) and m. Or type :md in any cell. y or :code turns it back into code. Turning a code cell into markdown removes its variables, so the cells that used them are marked stale (reactive mode re-runs them, and they fail).
  • Edit: select the cell and press enter (or i), or double-click it.
  • Render: escape escape (back to cell mode), shift+enter (render and go to the next cell), ctrl+enter (render and stay), or just move to another cell.
  • Files: in .py notebooks a markdown cell is # %% [markdown] followed by lines starting with # (the Jupytext format). In plain scripts without markers, a top-level """text""" string is a markdown cell. .ipynb markdown cells load and save as markdown cells.

A code cell whose last line is a bare string ("""note""") does not print that string as its result.

Clone this wiki locally