9 Different Ways to Embed Code in Medium

Learn to embed code in a beautiful way

Abhay Parashar
The Pythoneers

--

On Medium, programming is the most read content. The Programming tag itself has around 175k followers and combined with all other tags related to programming, it has over 500k followers. Most of the programming articles are tutorial and guide based articles. The soul of these articles are code blocks. If an author is successfully able to showcase the code in a beautiful way, then there is a higher chance that the article will get a huge response.

In this blog, I will show you 9 different ways you can embed code blocks in the medium.

1. Inline Code

Inline code is often used to highlight a keyword or an operator in the sentence. You can start an inline code by typing a single ` (backtick character) and then start typing.

2. Embedded Code Directly on Medium

Medium allows you to add code blocks directly into the articles using its code blocks. The Code Blocks don’t give you syntax highlighting but still makes your code stand out from all the other content of your article.

To embed code directly in your medium articles, just press:

  • Windows : ctrl+alt+6
  • Mac : command+option+6

--

--

Abhay Parashar
The Pythoneers

Cyber Guy 🧑‍💻| Top Writer | 5M+ Views | Engineer | Learning and Sharing Knowledge Everyday | Python is ❤️| Editor of The Pythoneers