Syntax guidance for Markdown files, widgets, wikis, and pull request comments

VSTS | TFS 2018 | TFS 2017 | TFS 2015

Having the right guidance at the right time is critical to success. To support your team or contributors to your project, use markdown to add rich formatting, tables, and images to your project pages, readme files, dashboards, and pull request comments.

You can provide guidance to your team in these places using markdown:

In this topic you'll find some basic Markdown syntax guidance. You can use both common Markdown conventions and GitHub-flavored extensions.


Structure your comments using headers. Headers segment longer comments, making them easier to read.

Start a line with a hash character # to set a heading. Organize your remarks with subheadings by starting a line with additional hash characters, for example ####. Up to six levels of headings are supported.


# This is a H1 header
## This is a H2 header
### This is a H3 header
#### This is a H4 header
##### This is a H5 header


Web portal, Headers 1 through 5

Paragraphs and line breaks

Make your text easier to read by breaking it up with paragraphs or line breaks.

In pull request comments and the wiki, press Enter to insert a line break and begin text on a new line.

In a Markdown file or widget, enter two spaces prior to the line break to begin a new paragraph, or enter two line breaks consecutively to begin a new paragraph.

Example - pull request comment:

Add lines between your text with the Enter key.
This spaces your text better and makes it easier to read.

Add lines between your text with the Enter key.
This spaces your text better and makes it easier to read.

Example - markdown file or widget:

Add two spaces prior to the end of the line.(space, space)     
This adds space in between paragraphs.

Add two spaces prior to the end of the line.

This adds space in between paragraphs.


Quote previous comments or text to set context for your comment or text.

Quote single lines of text be putting a > before the text. Use multiple > characters to nest quoted text. Quote blocks of lines of text by using the same level of > across multiple lines.


> Single line quote
>> Nested    
>> multiple line
>> quote


quoting in markdown

Horizontal rules

Add a horizontal rule by adding a new line that's just a series of dashes ---. There must be a blank line above the line containing the ---.







Organize related items with lists. You can add ordered lists with numbers, or unordered lists with just bullets.

Ordered lists start with a number followed by a period for each list item. Unordered lists start with a -. Begin each list item on a new line. In a Markdown file or widget, enter two spaces prior to the line break to begin a new paragraph, or enter two line breaks consecutively to begin a new paragraph.

Ordered or numbered lists


0. First item.
0. Second item.
0. Third item.


  1. First item.
  2. Second item.
  3. Third item.

Bullet lists


- Item 1
- Item 2
- Item 3


  • Item 1
  • Item 2
  • Item 3

Nested lists


1. First item.
   - Item 1
   - Item 2
   - Item 3
1. Second item.
   - Nested item 1
   - Nested item 2
   - Nested item 3 


  1. First item.
    • Item 1
    • Item 2
    • Item 3
  2. Second item.
    • Nested item 1
    • Nested item 2
    • Nested item 3

In pull request comments and wiki, HTTP and HTTPS URLs are automatically formatted as links. Also, within pull requests, you can link to work items by typing the # key and a work item ID, and then choosing the work item from the list.

In markdown files and widgets, you can set text hyperlinks for your URL using the standard markdown link syntax:

[Link Text](Link URL)

When linking to another Markdown page in the same Git or TFVC repository, the link target can be a relative path or an absolute path in the repository.

Supported links for Welcome pages:

  • Relative path: [text to display](./
  • Absolute path in Git: [text to display](/folder/
  • Absolute path in TFVC: [text to display]($/project/folder/
  • URL: [text to display](

Supported links for Markdown widget:

  • URL: [text to display](
Supported links for Wiki:
  • Absolute path of Wiki pages: [text to display](/parent-page/child-page)
  • URL: [text to display](


Links to documents on file shares using file:// are not supported on VSTS or TFS 2017.1 and later versions. This restriction has been implemented for security purposes.

For information on how to specify relative links from a Welcome page or Markdown widget, see Source control relative links.


[C# language reference](


C# language reference


Feature availability: You can use the #ID control to link to a work item from within a Wiki page from your VSTS account or TFS 2018.

Simply enter the pound sign (#) and enter a work item ID.

Links to source control files are interpreted differently depending on whether you specify them in a Welcome page or a Markdown widget. The system interprets relative links as follows:

  • Welcome page: relative to the root of the source control repository in which the welcome page exists
  • Markdown widget: relative to the team project collection URL base.

For example:

Welcome page Markdown widget equivalent
/BuildTemplates/AzureContinuousDeploy.11.xaml /DefaultCollection/Fabrikam Fiber/_versionControl#path=$/Tfvc Welcome/BuildTemplates/AzureContinuousDeploy.11.xaml
./ /DefaultCollection/Fabrikam Fiber/_versionControl#path=$/Tfvc Welcome/

Within Markdown files, anchor IDs are assigned to all headings when rendered as HTML. The ID is the heading text, with the spaces replaced by dashes (-) and all lower case.


###Link to a heading in the page


The syntax for an anchor link to a section...

[Link to a heading in the page](#link-to-a-heading-in-the-page)

The ID is all lower case, and the link is case sensitive, so be sure to use lower case, even though the heading itself uses upper case.

You can also reference headings within another Markdown file:

[text to display](./ id)  

In wiki, you can also reference heading in another page:

[text to display](/page-name#section-name)


Add images and animated GIFs to your pull request comments, markdown files, or wiki pages to highlight issues or just to liven the discussion.

Use the following syntax to add an image:

The text in the brackets describes the image being linked and the URL points to the image location.


![Let's use this flow for the login experience](


Sample flowchart with three items

The path to the image file can be a relative path or the absolute path in Git or TVFC, just like the path to another Markdown file in a link.

  • Relative path:
    ![Image alt text](./image.png)
  • Absolute path in Git:
    ![Image alt text](/_img/markdown-guidance/image.png)
  • Absolute path in TFVC:
    ![Image alt text]($/project/folder/_img/markdown-guidance/image.png)
  • Resize image:
    ![Image alt text]($/project/folder/_img/markdown-guidance/image.png =WIDTHxHEIGHT)


Feature availability: The syntax to support image resizing is only supported in pull requests and the Wiki.


Organize structured data with tables. Tables are especially useful for describing function parameters, object methods, and other data that has a clear name to description mapping.

  • Place each table row on its own line
  • Separate table cells using the pipe character |
  • The first two lines of a table set the column headers and the alignment of elements in the table
  • Use colons (:) when dividing the header and body of tables to specify column alignment (left, center, right)
  • To start a new line, use the HTML break tag (<br/>) (Works within a Wiki but not elsewhere)
  • Make sure to end each row with a CR or LF.


| Heading 1 | Heading 2 | Heading 3 |  
| Cell A1 | Cell A2 | Cell A3 |  
| Cell B1 | Cell B2 | Cell B3
second line of text |


Heading 1 Heading 2 Heading 3
Cell A1 Cell A2 Cell A3
Cell B1 Cell B2 Cell B3
second line of text

Checklist or task list

Use [ ] or [x] to support checklists. You need to precede the checklist with either -<space> or 1.<space> (any numeral).


- [ ] A  
- [ ] B  
- [ ] C  
- [x] A  
- [x] B  
- [x] C  




A checklist within a table cell isn't supported.

Emphasis (bold, italics, strikethrough)

You can emphasize text by applying bold, italics, or strikethrough to characters:

  • To apply italics: surround the text with an asterisk * or underscore _
  • To apply bold: surround the text with double asterisks **.
  • To apply strikethrough: surround the text with double tilde characters ~~.

Combine these elements to apply multiple emphasis to text.


Use _emphasis_ in comments to express **strong** opinions and point out ~~corrections~~ 
**_Bold, italizied text_**  
**~~Bold, strike-through text~~**

Use emphasis in comments to express strong opinions and point out corrections
Bold, italizied text
Bold, strike-through text

Code highlighting

Highlight suggested code segments using code highlight blocks. To indicate a span of code, wrap it with three backtick quotes ( ```) on a new line at both the start and end of the block.


$ sudo npm install vsoagent-installer -g  


$ sudo npm install vsoagent-installer -g

Within a markdown file, text with four spaces at the beginning of the line automatically converts to a code block.

Set a language identifier for the code block to enable syntax highlighting for any of the supported languages.

``` language

Additional examples:

``` js
const count = records.length;
const count = records.length;

``` csharp
Console.WriteLine("Hello, World!");
Console.WriteLine("Hello, World!");


In pull request comments and wiki pages, you can use emojis to add character and react to comments in the request. Type in what you're feeling surrounded by : characters to get a matching emoji in your text. The full set of emojis are supported.




Emojis in markdown

To escape emojis, enclose them using the ` character.


`:smile:` `:)` `:angry:`


:smile: :) :angry:

Special characters

Syntax Example/notes

To insert one of the following characters, prefix with a backslash:

\ backslash

` backtick

_ underscore

{} curly braces

[] square brackets

() parentheses

# hash mark

+ plus sign

- minus sign (hyphen)

. dot

! exclamation mark

Some examples on inserting special characters

Enter \\ to get \

Enter \_ to get _

Enter \# to get #

Enter \( to get (

Enter \. to get .

Enter \! to get !


In pull request comments and wiki pages, you can attach files to illustrate your point or to give more detailed reasoning behind your suggestions. To attach a file, drag and drop it into the comment field or wiki page edit experience. You can also select the paper-clip icon in the upper-right of the comment box or the format pane in wiki page.

Web portal, Pull Request, Attach files via drag and drop i

If you have an image in your clipboard, you can paste it from the clipboard into the comment box or wiki page and it will render directly into your comment or wiki page.

Attachments support the following file formats:

  • Images: PNG (.png), GIF (.gif), JPEG (both .jpeg and .jpg)
  • Documents: Word (.docx), Excel (.xlsx and .csv), and Powerpoint (.pptx), text files (.txt), and PDFs (.pdf)
  • Compressed files: ZIP (.zip) and GZIP (.gz)
  • Video files: MOV (.mov), MP4 (.mp4)

Attaching non-image files creates a link to the file in your comment. Update the description text between the brackets to change the text displayed in the link. Attached image files render directly into your comment or wiki pages.

Once you save or update a comment or wiki page with an attachment, you can see the attached image(s) and can select links to download attached files.


In wiki pages, you can also create rich content using HTML tags.

Example - Embedded video

<video src="<path of the video file>" width=400 controls>


Example - Rich text format

<p>This text needs to <del>strikethrough</del> <ins>since it is redundant</ins>!</p>
<p><tt>This text is teletype text.</tt></p>
<font color="blue">Colored text</font>
<center>This text will be center-aligned.</center>
<p>This text contains <sup>superscript</sup> text.</p> 
<p>This text contains <sub>subscript</sub> text.</p>
<p>The project status is <span style="color:green;font-weight:bold">GREEN</span> even though the bug count / developer may be in <span style="color:red;font-weight:bold">red.</span> - Capability of span
<p><small>Disclaimer: Wiki also supports showing small text</small></p>
<p><big>Bigger text</big></p> 


This text needs to strikethrough since it is redundant!

This text is teletype text.

Colored text
This text will be center-aligned.

This text contains superscript text.

This text contains subscript text.

The project status is GREEN even though the bug count / developer may be in red. - Capability of span

Disclaimer: Wiki also supports showing small text

Bigger text

Mathematical notation and characters


Feature availability: This feature is currently supported within Wiki pages and pull requests for VSTS accounts.

Both inline and block KaTeX notation is supported in wiki pages and pull requests. This includes inserting symbols, Greek letters, mathematical operators, powers and indices, fractions and binomials, and other KaTeX supported elements.

To include mathematical notation, surround the mathematical notation with a $ sign, for inline, and $$ for block, as shown in the following examples:

Example: Greek characters

\alpha, \beta, \gamma, \delta, \epsilon, \zeta, \eta, \theta, \kappa, \lambda, \mu, \nu, \omicron, \pi, \rho, \sigma, \tau, \upsilon, \phi, ...   

$\Gamma,  \Delta,  \Theta, \Lambda, \Xi, \Pi, \Sigma, \Upsilon, \Phi, \Psi, \Omega$ 


Greek letters

Example: Algebraic notation

Area of a circle is $\pi r^2$

And, the area of a triangle is: 



Algebraic notation

Example: Sums and Integrals

\sum_{i=1}^{10} t_i

\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x


Greek letters

## Feedback and support
We welcome your feedback. For product related inquiries, review our User Voice page or report a problem at Developer Community. Also, you can get advice on Stack Overflow, or get support via our Support page. Follow us on Twitter @vsts. �