Tables

Tables can be a useful way to display data in a structured and organized format. Markdown provides a simple syntax to create tables that can be easily converted into HTML or other formats. In this section, we will cover the basics of creating tables in markdown and how to format them using various options available with markdown.


Adding a Table

To add a table, use three or more hyphens to create each column's header, and use pipes to separate each column. For compatibility, you should also add a pipe on either end of the row.

| Column one    | Column two    |
| ------------- | ------------- |
| Row one       | Text          |
| Row two       | Text          |

img


Cell Widths

Cell widths can vary, as shown below. The rendered output will look the same.

Column one | Column two
--- | ---
Row one | Text
Row tow | Text

img


Text Alignment

You can align text in the columns to the left, right, or center by adding a colon to the left, right, or on both sides of the hyphens within the header row.

| Aligned to the Left | Aligned to the Center | Aligned to the Right |
| :---                |        :----:         |                 ---: |
| Text                | Text                  | Text                 |
| Text                | Text                  | Text                 |

img