Markdown Coach

Markdown Inline Code: Backticks Explained

Inline code marks a command, file name or bit of code inside a sentence, so it shows in a code font and is never formatted. Put one backtick on each side. The backtick key is left of 1.

The rule

Put one backtick ` on each side of a command or a bit of code. The backtick key is left of 1.

You type

Type `npm install` first.

You get

Type npm install first.

Try it yourself

Show git status as inline code.

Live preview

More examples

You type

Type `npm install` to set it up.

You get

Type npm install to set it up.

A command inside a sentence.

You type

Open `README.md` in any editor.

You get

Open README.md in any editor.

File names work well as inline code too.

Common mistakes

You type

Type 'npm install' to set it up.

Shows as

Type 'npm install' to set it up.

Those are apostrophes, not backticks. The backtick ` is on the key left of 1.

You type

Type `npm install to set it up.

Shows as

Type `npm install to set it up.

Only one backtick, so nothing becomes code.

Where it works

Everywhere. Markdown symbols inside backticks are shown as they are, which makes it handy for writing about Markdown itself.

Keep it, not just learn it

The full course has 22 skills on five islands, short Missions that check your answers, and reviews a few days later so it sticks. Free, no sign-up.

Practise this in the course