Inline code marks a short span of text as a literal, verbatim value — typically a filename, key name, or short snippet — rendered in a monospaced font. It is delimited by single or double backticks.
Use the `Save` option in the File menu.
Use double backticks when the content contains a backtick: ``Use `backticks` like this.``
Use the Save option in the File menu.
Use double backticks when the content contains a backtick: Use `backticks` like this.
Best Practice
- Use single backticks for the common case; use double backticks only when the content itself contains a backtick.
- Apply inline code to all technical literals: filenames, key names, setting values, and short code expressions.
- Do not use inline code for general emphasis or decoration — it carries a specific semantic meaning (verbatim content) and should not be overloaded.
Notes
Leading and Trailing Spaces
CommonMark allows a single leading and trailing space inside a backtick span to be stripped. This lets you write a backtick character at the start or end of the span:
`` ` `` — renders as a single backtick character.
Inline Code vs Code Block
Inline code is for short spans within a sentence. For multi-line verbatim content, use a fenced or indented code block instead.
Markdown Flavour Support
Supported by all major flavours.
Flavour Support Detail
| Flavour | Support | Notes |
|---|---|---|
| Original Markdown | Yes | Single and double backtick forms defined in the original spec. |
| CommonMark | Yes | Precisely specifies leading/trailing space stripping and backtick matching rules. |
| GitHub Flavored Markdown | Yes | Inherits CommonMark rules. |
| Pandoc Markdown | Yes | Full support. |
Practical Examples
- Referring to a menu option in a how-to post: Inline code makes it clear that
Save Asis an exact label to look for, not a general description.
Go to `File`, then choose `Save As` and give the document a new name.
Go to File, then choose Save As and give the document a new name.
- Naming a setting in a personal wiki: Mark the exact name of a preference or toggle so a reader knows to look for it verbatim in an interface.
In the app settings, switch on `Dark mode` under the Appearance section.
In the app settings, switch on Dark mode under the Appearance section.
- Referencing a filename in a recipe index: Inline code distinguishes a filename from the surrounding prose, making it easy to spot at a glance.
The master ingredient list is saved as `pantry-staples.md` in the notes folder.
The master ingredient list is saved as pantry-staples.md in the notes folder.