Inline markup marks words inside a paragraph, list item, title or table cell. It
cannot be nested: *emphasis with **strong** inside* does not work, which
is a deliberate simplicity of the language.
Constructs
| Markup | Result |
|---|---|
*text* | Emphasis, usually italic. |
**text** | Strong emphasis, usually bold. |
``text`` | Inline literal: shown as is, in a fixed-width font; backslashes are not escapes inside it. |
`text` | Interpreted text, handled by the default role (title reference unless changed). |
:role:`text` or `text`:role: | Interpreted text with a named role. |
name_, `phrase name`_ | A hyperlink reference to a target of that name. |
name__, `phrase`__ | An anonymous hyperlink reference, matched in order with anonymous targets. |
`text <https://example.org/>`_ | A link with its URL embedded; it also defines a target named text. With __ no target is defined. `text <name_>`_ embeds an alias for another target. |
_`name` | An inline internal target: the text is shown and can be linked to. |
[1]_, [#]_, [#label]_, [*]_ | Footnote references: numbered, auto-numbered, labelled and auto-symbol. |
[CIT2002]_ | A citation reference. |
|name| | A substitution reference, replaced by its definition. |name|_ also links to a target name; |name|__ links anonymously. |
https://example.org/, mailto:a@example.org, a@example.org | Standalone hyperlinks: absolute URLs with a known scheme and e-mail addresses are recognised without markup. |
Where markup is recognised
To avoid treating ordinary asterisks and backquotes as markup, the start and end strings count only in these positions:
- The start-string must begin a text block or follow whitespace, one of the
characters
- : / ' " < ( [ {, or a similar Unicode opening or delimiting punctuation character. - The start-string must be followed by a non-whitespace character.
- The end-string must be preceded by a non-whitespace character.
- The end-string must end a text block or be followed by whitespace, one of
- . , : ; ! ? \ / ' " ) ] } >, or similar Unicode closing or delimiting punctuation. - If the start-string directly follows an opening bracket or quote, the character
after it must not be the matching closing one:
"*"and(*)are not emphasis. - An end-string must be separated by at least one character from the start-string:
**alone is not empty emphasis. - An unescaped backslash before a start- or end-string stops it being recognised, except at the end of an inline literal.
Inline markup that does not fit, such as the middle of a word, needs escaped
spaces: un\ *frigging*\ believable gives “unfriggingbelievable”,
because a backslash-escaped space produces nothing.
Escaping
A backslash makes the next character plain text: \* is a literal
asterisk, \\ a backslash. A backslash before whitespace removes both.
In literal blocks, inline literals and some directive content, backslashes have no
special meaning. In Python docstrings the backslash must itself be escaped, or a raw
string used.
Example
The *Analytical Engine* was **never** built.
See `the Python site <https://www.python.org/>`_ and PEP :PEP:`8`.
Call ``print()`` to show it.\ [#]_ |copy| 2026.
.. [#] A footnote.
.. |copy| unicode:: U+00A9