---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://3y3.dev/en/syntax/code.md
  - https://3y3.dev/ru/syntax/code.md
  - href: en/syntax/code.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
updatedAt: '2025-10-10T14:11:39.000Z'
---
> **Documentation Index:** Fetch the complete configuration index at https://3y3.dev/en/llms.txt

# Code snippets

You can add a code snippet to the text of a paragraph or make it a separate block.

## In the text {#inline}

To add a code snippet to the text, use the ` symbol.

```markdown
`Code snippet` in the text.
```

**Result**

`Code snippet` in the text.

{% note tip %}

We recommend using no more than 100 characters, because the text in these fragments doesn't wrap. For a larger number of characters, make the code a separate block.

{% endnote %}

## Separate block {#block}

To make a code snippet a separate block, separate it from the rest of the text on both sides with the characters ```.

To highlight the syntax, specify the language in which the code is written in the initial line. For example:

```markdown
```sql
```

The list of available languages can be found on [GitHub](https://github.com/highlightjs/highlight.js/tree/master/src/languages).

### Displaying Line Numbers {#line-numbers}

If you need to enable the line numbers display in the code block, use the keyword `showLineNumbers'.

Usage example:

````markdown
```sql showLineNumbers
  price= '2000'
  size= '24'  
  color= 'primary'
  variant= 'detailed' 
```
````

**Результат:**

```sql showLineNumbers
  price= '2000'
  size= '24'  
  color= 'primary'
  variant= 'detailed' 
```
