Message formatting for bots

Important

The articles in this section are based on the v3 Bot Framework SDK. If you're looking for current documentation (version 4.6 or later of the SDK) see the Conversational Bots section.

You can set the optional TextFormat property to control how your message's text content is rendered.

Microsoft Teams supports the following formatting options:

TextFormat value Description
plain The text should be treated as raw text with no formatting applied at all
markdown The text should be treated as Markdown formatting and rendered on the channel as appropriate; see Formatting text content for supported styles
xml The text is simple XML markup; see Formatting text content for supported styles

Formatting text content

Microsoft Teams supports a subset of Markdown and XML (HTML) formatting tags.

Currently, the following limitations apply:

  • Text-only messages do not support table formatting
  • Rich cards support formatting in the text property only, not in the title or subtitle properties
  • Rich cards do not support Markdown or table formatting

Cross-platform support

To ensure that your formatting works across all platforms supported by Microsoft Teams, be aware that some styles are not currently supported across all platforms.

Style Text-only messages Rich cards (XML only)
bold
italic
header (levels 1–3)
strikethrough
horizontal rule
unordered list
ordered list
preformatted text
blockquote
hyperlink
image link

Support by individual platform

Support for text formatting varies by type of message and by platform.

Text-only messages

Style Desktop iOS Android
bold
italic
header (levels 1–3)
strikethrough
horizontal rule
unordered list
ordered list
preformatted text
blockquote
hyperlink
image link

Cards

See Card Formatting for support in cards.