cover
👩🏻‍💻

Code block supported

summary

Notion Code Block Rendering Supported

categories
Code
published date
last edited time
thumbnail

Java:

java

Copy

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

JavaScript:

javascript

Copy

console.log("Hello, World!");

JSON:

json

Copy

{
  "name": "John",
  "age": 30,
  "city": "New York"
}

Markdown:

markdown

Copy

# Heading 1
## Heading 2
### Heading 3

- List item 1
- List item 2

**Bold Text**

*Italic Text*

PowerShell:

powershell

Copy

Write-Host "Hello, World!"

Python:

python

Copy

print("Hello, World!")

TypeScript:

typescript

Copy

console.log("Hello, World!");

CSS:

css

Copy

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  color: #333;
}

JavaScript:

javascript

Copy

function greet() {
  console.log("Hello, World!");
}

greet();

Ruby:

ruby

Copy

puts "Hello, World!"

Sass:

sass

Copy

$font-stack:    Helvetica, sans-serif
$primary-color: #333

body
  font: 100% $font-stack
  color: $primary-color

SCSS:

scss

Copy

$font-stack:    Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

Scheme:

scheme

Copy

schemeCopy code
(define (hello)
  (display "Hello, World!")
  (newline))

(hello)

SQL:

sql

Copy

SELECT * FROM users WHERE country = 'USA';

YAML:

yaml

Copy

name: John Doe
age: 30
city: New York

XML:

xml

Copy

<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
html

Copy

<svg
  xmlns="http://www.w3.org/2000/svg"
  width={14}
  height={14}
  fill="none"
  viewBox="0 0 24 24"
>
  <path
    stroke="currentColor"
    strokeLinecap="round"
    strokeLinejoin="round"
    strokeWidth={2}
    d="M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M8 5v0a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v0M8 5v0a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v0"
  />
</svg>




⛔

All Notion code block languages are supported except for Assembly, PHP, Racket, and Notion Formula.