Code blocks
Inline code
Section titled “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 blocks
Section titled “Code blocks”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.javaclass HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); }}```Code groups
Section titled “Code groups”To display the same snippet in multiple languages as tabs, use the CodeGroup component. See Components for usage.