How to create a code block in Medium

Julien Balmont
Zenchef’s Tech and Product Blog
1 min readJan 4, 2017

Since Medium documentation “Hints and keyboard shortcuts” is not correct about creating a code block, I’ve made some research and finally found how to create a code block. Thought it would be good to share it here.

On Mac OS:

  1. You can highlight some text, and press Cmd + Alt + 6. This will wrap the whole paragraph into a code block
  2. Or, you can start a new paragraph, and press Cmd + Alt + 6. This will start an empty code block.

On Windows:

  1. You can highlight some text, and press Ctrl + Alt + 6. This will wrap the whole paragraph into a code block
  2. Or, you can start a new paragraph, and press Ctrl + Alt + 6. This will start an empty code block.

--

--