MeshWorld India Logo MeshWorld.
Markdown Tutorial 3 min read

Tables in Markdown - Create & Format Data

Vishnu
By Vishnu
| Updated: May 8, 2026
Tables in Markdown - Create & Format Data

Tables are great for comparing options, listing features, or presenting structured data. Markdown tables use pipes | to separate columns and hyphens - to define the header row.


Basic Table

| Name    | Age | City      |
| ------- | --- | --------- |
| Alice   | 28  | Mumbai    |
| Bob     | 34  | Bangalore |
| Charlie | 22  | Delhi     |
NameAgeCity
Alice28Mumbai
Bob34Bangalore
Charlie22Delhi

The first row is the header. The second row of hyphens --- separates the header from the data rows. Every row after that is a data row.

HTML equivalent:

<table>
  <thead>
    <tr><th>Name</th><th>Age</th><th>City</th></tr>
  </thead>
  <tbody>
    <tr><td>Alice</td><td>28</td><td>Mumbai</td></tr>
  </tbody>
</table>

Column Alignment

Control alignment by adding a colon : to the separator row.

SyntaxAlignment
---Left (default)
:---Left (explicit)
---:Right
:---:Center
| Left    | Center  | Right   |
| :------ | :-----: | ------: |
| Apple   | Banana  | Cherry  |
| 100     | 200     | 300     |
LeftCenterRight
AppleBananaCherry
100200300

Formatting Inside Cells

You can use inline Markdown inside table cells — bold, italic, inline code, and links all work.

| Feature       | Status        | Docs                              |
| ------------- | ------------- | --------------------------------- |
| **Bold text** | _Italic text_ | [Link](https://example.com)       |
| `inline code` | ~~removed~~   | [Guide](https://meshworld.in/)    |
FeatureStatusDocs
Bold textItalic textLink
inline coderemovedGuide

You cannot use block-level elements (like code blocks or lists) inside a table cell.


Column widths

The column widths in your raw Markdown don’t need to match — the renderer calculates them automatically. These two tables produce identical output:

| Name | Age |
| --- | --- |
| Alice | 28 |

| Name    | Age |
| ------- | --- |
| Alice   | 28  |

Spacing the columns consistently is purely for readability of the raw source.


Best Practices

  • Use tables for genuinely tabular data — comparisons, feature lists, reference tables.
  • Don’t use tables to force layout — that’s what CSS is for.
  • Keep cell content short. Long sentences inside table cells are hard to read.
  • Left-align text, right-align numbers — it’s easier to scan.

Quick Reference

| Header 1 | Header 2 | Header 3 |
| :------- | :------: | -------: |
| left     | center   | right    |

Hope you like this!

Keep helping and happy coding