# Code blocks

You can use UpNote to keep your library of code snippets or share them with others.&#x20;

<figure><img src="https://3053791484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFt4LISrSRa6fHrbSIdcE%2Fuploads%2FAdg6a5RmTTbOxCP1tsvW%2Fimage.png?alt=media&#x26;token=37900ef8-4e24-43b0-b28c-a13409801b25" alt=""><figcaption></figcaption></figure>

### On desktop

To insert a code block on Mac or Windows, simply type 3 backticks **` ``` `** or click the code block icon in the [formatting bar.](https://help.getupnote.com/~/revisions/OefAogcTDRyDfPXWqIui/write-and-edit/format-your-text)

![](https://3053791484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFt4LISrSRa6fHrbSIdcE%2Fuploads%2FL8H7jkDRVHJIoKv4JA0x%2Fimage.png?alt=media\&token=99eb0e90-bdaa-4e10-af2c-e153e18d4631)

Syntax highlighting is supported for a number of programming languages. To change the display language of your code:

* Right click on code block > Select **`Language`**
* Select a programming language in the list

To wrap your code, go to **`Settings`** > **`Editor`** > enable **`Wrap code`**

### On mobile

To insert a code block on iOS or Android, tap the **`+`** button in the formatting bar and select **`Code Block`**

![](https://3053791484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFt4LISrSRa6fHrbSIdcE%2Fuploads%2FwGmXpOWoSLTzgHyCPPHB%2Fimage.png?alt=media\&token=2f7ded77-557d-408f-a009-13939e3afde5)

To wrap your code, go to **`Settings`** > **`General`** > enable **`Wrap code`**
