Inline code
To denote aword or phrase as code, enclose it in backticks (`).
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.Basic code block
Add the programming language after the opening backticks for syntax highlighting:Code block with filename
Optionally, you can also write the name of your code file after the programming language:HelloWorld.java
Displaying the filename helps readers understand the context and location of the code.
Multiple code examples
Use the CodeGroup component to show multiple related code examples with tabs:CodeGroup is perfect for showing the same functionality across different programming languages or different approaches to solving the same problem.
Supported languages
Mintlify supports syntax highlighting for over 100 programming languages including:- Popular languages
- Web technologies
- Shell & config
- JavaScript/TypeScript
- Python
- Java
- C/C++/C#
- Ruby
- Go
- Rust
- PHP
- Swift
- Kotlin