Quick summary
Notion's built-in code block lets you insert and format code in any page using a simple slash command, with support for multiple programming languages including SQL, HTML, and more.
Steps
- Click the blank space where you want the code block to appear.
- Type /code to open the block menu.
- Click Code from the dropdown menu.
- Paste or type your code inside the code block.
- Click the language dropdown in the top right corner of the code block.
- Choose the coding language you want to use for formatting.
- Your code block is now successfully added in Notion.
