# Display syntax-highlighted code

[Canonical article](https://slides.com/docs/code-blocks)

Use the **Code** block to display syntax-highlighted code in a presentation. Select a language and theme, then type or paste your code. Highlighting updates in real time.

&lt;img src=&quot;https://static.slid.es/help/syntax-highlighted-code/language-theme.gif&quot; alt=&quot;Selecting a language and highlighting theme for a Code block&quot; width=&quot;1113&quot; height=&quot;791&quot;&gt;

## Line numbers and line highlights

Turn line numbers on or off in the block toolbar. To draw attention to specific lines, enter a comma-separated list of line numbers or ranges. For example:

- `1,4,10` highlights lines 1, 4, and 10.
- `2,5-15` highlights line 2 and lines 5 through 15.

&lt;img src=&quot;https://static.slid.es/help/syntax-highlighted-code/line-numbers.gif&quot; alt=&quot;Enabling line numbers and highlighting selected lines&quot; width=&quot;1113&quot; height=&quot;485&quot;&gt;

## Supported languages

Syntax highlighting is powered by the open-source [highlight.js](https://highlightjs.org/) project. Slides supports the languages listed in the [highlight.js demo](https://highlightjs.org/static/demo/).

## Code highlighting in action

&lt;iframe src=&quot;https://slides.com/news/code-block-2-5/embed&quot; title=&quot;Code Block 2.5: Scrollable Highlights&quot; width=&quot;576&quot; height=&quot;420&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
