Markdown Code Syntax

You can format text as code in Markdown, either inline within a sentence or as a standalone block.

Inline Code

To denote inline code (corresponding to the HTML code tag), wrap it in backticks (`).

Code Blocks

To create code blocks (corresponding to the HTML code tag nested inside an pre tag), you can either indent every line of the block by at least four spaces or one tab, or use fenced code blocks.

Fenced Code Blocks

Fenced code blocks are created by placing triple backticks (```) on the lines before and after the code block.

Syntax Highlighting

Many Markdown processors (including GitHub Flavored Markdown) allow you to add a language identifier to fenced code blocks to enable syntax highlighting.