Markdown Inline Code
Learn how to format inline code in markdown using backticks. Syntax, examples, platform support, and common mistakes.
What is markdown inline code?
Inline code is formatted by wrapping text in single backticks (`). It renders in a monospace font with a subtle background, making it ideal for variable names, commands, file paths, and short code snippets within a sentence.
Syntax
Single backticks
Wrap any word or phrase in single backticks to render it as inline code.
codeWith spaces
Commands and multi-word phrases work exactly the same way.
npm installDouble backticks (backtick inside)
Use double backticks when the code itself contains a backtick.
`nested`Platform support
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | — |
| GitLab | Yes | — |
| Discord | Yes | — |
| Slack | Yes | — |
| Notion | Yes | — |
| Obsidian | Yes | — |
Common mistakes
'code'
`code`
Single quotes are not backticks. Use the backtick key (top-left of most keyboards, below Esc).
``code``
`code`
Double backticks are only needed when the code contains a backtick. For normal code, use one.
Tips for inline code
Wrap file names, variable names, CLI commands, and function names in backticks to visually separate them from prose.
Inline code (`code`) is for short snippets inside text. For multi-line code, use a fenced code block (```).
Frequently asked questions
Everything you need to know.
How do I write a backtick inside inline code?
Use double backticks as the delimiter: `` `backtick` `` renders the word with a backtick visible inside it.
Related elements
Code Block
Markdown supports two types of code formatting: inline code with single backticks (`) for short snippets, and fenced code blocks with triple backticks (```) for multi-line code with optional syntax highlighting.
Bold
Bold text in markdown is created by wrapping words with double asterisks (**) or double underscores (__). Bold draws attention to important words and phrases, making your content easier to scan.
Escape Character
The backslash (\) is markdown's escape character. Placing a backslash before a markdown special character causes it to be displayed literally instead of being interpreted as formatting syntax. This is essential when you need to show asterisks, hashes, underscores, or other special characters as plain text.
Try it in the editor
Paste your markdown and see inline code rendered instantly with professional themes.