#4: Apply syntax highlighting to code blocks

👍0
👎0

Add your vote!

Back to all styles

In markdown, you can add a language modifier after the triple backticks (e.g. ```json) to get syntax highlighting.

To get syntax highlighting In Google Docs, you can:

Example

```json
{ "hello": "world" }
```

Why?

Syntax highlighting can help make the code more readable, especially when it's in the context of a document full of other kinds of text. It can also help identify problems with examples and code snippets.

~ https://developer.mozilla.org/en-US/docs/MDN/Contribute/Editor/Syntax_highlighting