Medium - how to embed code

0 points
Created by:

In this article, we would like to show you how to embed code in Medium posts.

There are three types of code you can create:

  1. Inline code,
  2. Code block,
  3. Code block with syntax highlighting.

1. Inline code 

To create inline code you need to press backtick and start typing.


Markdown - inline code example
Markdown - inline code example

    2. Code block

    To create code block u need to use a key combination depending on your operating system:

    • Windows: Ctrl + Alt + 6
    • MacOS: Command + Option + 6 
    • Linux: Ctrl + Alt + 6


    Medium - code block example
    Medium - code block example

    3. Code block with syntax highlighting

    Medium supports embedding GitHub Gists, so you need to create a gist, paste the link in the post on the medium and click enter.


    You can find a detailed description in this article


    Medium - embedded GitHub Gist example
    Medium - embedded GitHub Gist example
    Native Advertising
    Get your tech brand or product in front of software developers.
    For more information Contact us
    Dirask - we help you to
    solve coding problems.
    Ask question.

    ❤️💻 🙂