Markdown Code Block Syntax

Show code in your Markdown file.

Fenced Code Blocks

To create a code block, wrap your code with three backticks (```). You can also specify the programming language for syntax highlighting.

Markdown:

```json
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```

Rendered Output:

{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Inline Code

To denote a word or phrase as code, enclose it in backticks (`).

Markdown:

At the command prompt, type `nano`.

Rendered Output:

At the command prompt, type nano.

Next, let's learn about Markdown Horizontal Rule Syntax.