I need to use backticks at the beginning and the end of an inline code block.

I have tried:

  • using multiple backticks
  • using multiple backticks with space character between them
  • using <pre> html tag outside the backticks

But none of above will work. I need to know how to escape special meaning of backticks.

In my special case, I want to show subshells inside my sentence. I can use $(command) but I want to use the backtick method.

1 Answer 1


As a code block

I'm assuming you mean something like this?


Simply indent the code block using 4 spaces.

As inlined code block

If on the other hand you want them inlined then simply prefix the inline code block with 2 backticks before and after instead. Any single backticks within these will render as a backtick.

This is a inline code block with a ` and another `. The same trick can be applied to get backticks at the beginning and end.

For example: ` <-- beginning backtick, and ending backtick --> `.

The code to create the above:

`` ` <-- beginning backtick, and ending backtick --> ` ``


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .