Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Syntax highlighting – Markdown



function doSomething() {
  // Write code here


To add syntax highlighting to your code snippets in Markdown, add the name of the language right after the first 3 backticks.

Some languages may have more than one way of adding syntax highlighting. For example, you can also use js for JavaScript code.

function doSomething() {
  // Write code here


Click here to see an example of what this code looks like when rendered on GitHub. (Click the Raw button to see the actual Markdown code.)


First, recreate the code snippet from the Summary section in your Markdown file. Then try customizing the text.


Mastering Markdown on GitHub

Lesson tags: Free Lesson
Back to: Markdown Reference > GitHub Markdown