Medium Formatting

How to Insert a Code Block or Inline Code into a Medium Article

Utilizing Medium’s built in tools to embed code in your article

Casey Botticello
Blogging Guide
Published in
4 min readOct 10, 2019

--

medium code, medium article code, how to add code block to medium, how to add inline code to medium, medium inline code
Source: Casey Botticello of Blogging Guide

Medium offers a wide range of tools to help authors format their writing. If you are an author who frequently discusses coding or programming or are just looking to spice up the formatting of your Medium article, code blocks and inline code are invaluable tools.

Medium offers two main types of coding blocks:

  1. Inline Code Blocks
  2. Separate Code Blocks

What are Inline Code Blocks?

Inline code is great to use when you want to highlight a short snippet of code (for example: the definition of a function or the name of a variable) inside a paragraph.

How to Create Inline Code Blocks

For inline code blocks in a paragraph on Medium, type a single backtick (`) to begin and end your code. Or highlight a selection of text and press the backtick key.

Keyboard with Backtick Key (`) Highlighted, backtick keyboard, where is backtick, backtick medium, medium backtick
Keyboard with Backtick Key (`) Highlighted

--

--

Casey Botticello
Blogging Guide

🚀 Founder of BloggingGuide.com | Entrepreneur & Blogger | Join 100,000+ creators & learn how to make money writing online ➜ bloggingguide.substack.com