The Dead Simple Markdown Guide to Escaping Characters

Written by typesetting | Published 2024/08/20
Tech Story Tags: markdown | markdown-syntax | text-formatting | markdown-guide | markdown-escaping-characters | markdown-formatting | markdown-best-practices | markdown-special-characters

TLDRTo display special characters in Markdown, use a backslash (\) before the character. This technique helps you show symbols that might otherwise be interpreted as formatting commands, such as asterisks or brackets.via the TL;DR App

Escaping Characters

To display a literal character that would otherwise be used to format text in a Markdown document, add a backslash (\) in front of the character.

\* Without the backslash, this would be a bullet in an unordered list.

The rendered output looks like this:

* Without the backslash, this would be a bullet in an unordered list.

Characters You Can Escape

You can use a backslash to escape the following characters.

Character

Name

backslash

`

backtick (see also escaping backticks in code)

*

asterisk

_

underscore

{ }

curly braces

[ ]

brackets

< >

angle brackets

( )

parentheses

#

pound sign

+

plus sign

-

minus sign (hyphen)

.

dot

!

exclamation mark

|

pipe (see also escaping pipe in tables)

This guide is a Matt Cone project available on Markdown Guide under the CC BY-SA 4.0 license.


Written by typesetting | Shaping readable and sustainable publications.
Published by HackerNoon on 2024/08/20