Fenced Code Blocks in Markdown
From the Markdown cheat sheet ยท Code ยท verified Aug 2026
Fenced Code Blocks
Create multi-line code blocks with language hints.
markdown
~~~js
const message = 'Hello'
console.log(message)
~~~๐ Put the language immediately after the opening fence
๐ก Tilde fences help when documenting backtick fences
๐ Syntax highlighting depends on the renderer
๐ฏ Prefer fenced blocks over four-space indentation
fenced-codesyntax-highlightingcode-blocks
Continue with Markdown
Save the full cheat sheet or work through every related task.