Inline Markup

Inline markup allows characters, words, and phrases to have styles such as italics and bold, and functionality such as hyperlinks. reStructuredText uses special markup characters such as the asterisk *, underscore _, and backslash \ to apply inline styles.

The following restrictions apply to inline markup:

  • It cannot be nested. For example, you cannot italicise a bold phrase.

  • The markup content cannot start or end with whitespace.

There are nine inline markup constructs. Five common constructs are given below.

Construct

Display

Description

*emphasis*

emphasis

Normally rendered as italics.

**strong**

strong

Normally rendered as bold.

``literal``

literal

Normally rendered as monospaced text

reference_

backslash

A hyperlink reference

`phrase reference`_

Escaping characters

A multi-word hyperlink reference

Escaping characters

To override the special meaning of reStructuredText markup characters and display the literal characters, prepend them with a backslash \. Using a backslash in this way is called escaping characters.

Escape sequences for various markup characters are shown below.

Escape sequence

Display

Description

\ \

\

Display a literal backslash by escaping \

reference\_

reference_

Display reference syntax by escaping _

\*emphasis\*

*emphasis*

Display emphasis syntax by escaping each *

\*\*strong\*\*

**strong**

Display strong syntax by escaping each *

Note

As shown in the Display column, escape backslashes and spaces (not the literal characters) are excluded from the processed document.