Back to cheat sheet

Code block

Wrap multi-line code in three backticks (```). Add a language name for syntax highlighting.

Markdown
```js
const x = 1;
console.log(x);
```
Preview
const x = 1;
console.log(x);
HTML output
<pre><code class="language-js">const x = 1;
console.log(x);
</code></pre>

Tip — Put a language name like js or python on the first line to highlight it.

Open in converter