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
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:
- Inline Code Blocks
- 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.