Skip to content

How to Write Formatted Code in Teams Chat

Teams

When you want to send to your colleague a text with C# code or any other language, you can make the code look just like in an IDE - colored and highlighted.

If you type three backticks ``` at the beginning of a line in Microsoft Teams and press Enter, you can write properly formatted code in the chat. Almost like in MarkDown.

It opens a code block where:

  • The formatting is preserved
  • The text appears in a monospace font
  • Your code is much easier to read

It's very useful when while technical topics with your team.