How to Code in Notion
Here is how you can display your code and share it beautifully in Notion:
- Hover over the position you wish to enter code and click on the Add (+) icon that appears.
- Scroll down to Code.
- You have now inserted a code block! Click on the top left menu to select the appropriate language syntax highlighting.
- Search or select the language from the list.
- Use the top right dotted menu for more options.
- One such useful option is Wrap code to avoid scrolling sideways when lines get too long.
- Enter your code to be seen, shared, copied and appreciated.
This tutorial deals with code blocks which are an amazing way to display and share your code in Notion. For running live code, explore the embed feature.