Code Blocks
Anonymous contributor
Anonymous contributor1 total contribution
Anonymous contributor
Published Mar 21, 2023
Contribute to Docs
Code blocks can be used to display multiple lines of code. They preserve formatting and provide syntax highlighting when possible.
Basic Usage
To create a basic code block, wrap the code with three backticks (```
):
```This is a code block.```
The result will look like this:
This is a code block.
Syntax Highlighting
Optionally, a language can be specified for a code block to enable syntax highlighting. This can be done by appending the language to the starting backticks:
```jsconsole.log('Hello world');```
The result will look like this:
console.log('Hello world');
All contributors
- Anonymous contributorAnonymous contributor1 total contribution
- Anonymous contributor
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.