Skip to content

Code blocks in Markdown

Wrap a word or two in single backticks to format it as code, right inside a sentence.

Run the `print()` function.

For multiple lines, put three backticks on their own line before and after. Add a language name after the opening fence for syntax highlighting.

```python
print("Hello, AI")
## Why it matters for AI
Fences tell the model "this is code, read it literally" — it won't reflow your indentation or turn straight quotes into curly ones. Always fence commands, JSON and config.
:::tip
Name the language after the opening fence (```json, ```bash). It sharpens highlighting and tells AI exactly how to parse the block.
:::