It depends. There's inline code and there are code blocks.

Inline code can be started with any number of backticks, with the inline code following, and then the same number of backticks again.

A code block is started by X number of backticks (usually 3), an optional language identifier, followed by a line break.
Then there's comes the code.
And on a new separate line, you have X number of backticks again, followed by a line break.

It's all in the markdown specs.

1 Like