Code in markdown
Whether your aim is to render a word or phrase in code, or a code block, markdown has you covered
- Code blocks
Contents
To denote a word or phrase as code, enclose it in backticks (`). An example of how to do this is shown below:
`html`
Which renders as:
html
Code blocks
To create code blocks, indent every line of the block by at least four spaces or one tab.
<html>
<head>
</head>
</html>
The rendered output looks like this:
<html>
<head>
</head>
</html>
To create code blocks without indenting lines, seeĀ fenced code blocks.