EN
Markdown - how to create code lines (syntax highlighting - github, dev.to, stackoverflow)
0 points
In this article, we would like to show you how to create code lines in markdown.
Below examples present how to create:
- Inline code
- Code blocks with highlighting
To create inline code in markdown you need to wrap your code into backticks ``
.
Example:
xxxxxxxxxx
1
`var result = 1`
Result:

To create a code block with highlighting you need to wrap your code with three backticks (```
) and specify the programming language in the first line.
Example:
xxxxxxxxxx
1
```javascript
2
3
const data = {
4
user: {
5
username: 'john',
6
password: 'Secret$$'
7
}
8
};
9
```
Result from github.com:

Result from dev.to:

Result from stackoverflow.com:
