Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 985 Bytes

code.mdx

File metadata and controls

39 lines (30 loc) · 985 Bytes
title description icon
Code Blocks
Display inline code and code blocks
code

Basic

Inline Code

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

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

Code Block

Use fenced code blocks by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language.

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

Visit the Code Block page for more detailed docs.