Markdown Table Tutorial: How to Create Tables in Markdown

Joan Jul 01, 2026

Markdown is a lightweight markup language used for formatting text. It's widely used in many applications, including GitHub, Reddit, and Stack Overflow. One of the many features Markdown offers is the ability to create tables, which can be incredibly useful for displaying data in an organized manner. Here's a step-by-step guide on how to write a table in Markdown.

How to Create a Markdown Table
How to Create a Markdown Table

Before we dive into the specifics, let's look at a simple example of a Markdown table:

What is Markdown & How It Can Help You Write Faster
What is Markdown & How It Can Help You Write Faster

``` | Header 1 | Header 2 | |----------|----------| | Cell 1 | Cell 2 | | Cell 3 | Cell 4 | ```

Understanding the Syntax

As you can see, a Markdown table is created by using pipes (|) to separate columns and dashes (-) to create a border. The first line is used to define the headers, and each subsequent line represents a new row of data.

How to Create a Markdown Table
How to Create a Markdown Table

You can also align text within a cell by adding a colon (:) to the left, right, or both sides of the dashes in the header row. For example:

``` | Left-aligned | Center-aligned | Right-aligned | | :----------- | :------------: | -----------: | | Cell 1 | Cell 2 | Cell 3 | ```

Creating a Table with Markdown

How to Create a Markdown Table
How to Create a Markdown Table

To create a table, start by defining your headers. For example, let's create a table with headers "Name" and "Age":

``` | Name | Age | |-------|-----| ```

Next, add your data rows. Let's add two rows of data:

``` | Name | Age | |-------|-----| | John | 30 | | Jane | 25 | ```

Adding More Columns and Rows

Markdown Cheat Sheet: Headers, Tables, Code Blocks, Links + Task Lists
Markdown Cheat Sheet: Headers, Tables, Code Blocks, Links + Task Lists

You can add more columns by simply adding more pipes and dashes. For example, let's add a "Country" column:

``` | Name | Age | Country | |-------|-----|---------| | John | 30 | USA | | Jane | 25 | Canada | ```

Similarly, you can add more rows by adding more lines of data. Just remember to keep the pipes and dashes consistent for each row.

Formatting Table Data

Easily Formatting Markdown Files in VS Code
Easily Formatting Markdown Files in VS Code

You can also format text within a table cell using standard Markdown syntax. For example, let's make "John" bold and "Jane" italic:

``` | Name | Age | Country | |-------|-----|---------| | **John** | 30 | USA | | *Jane* | 25 | Canada | ```

Remember, Markdown tables are a simple way to display data, but they don't support all the features of HTML tables. For more complex tables, you might want to consider using HTML instead.

【MN Third-Party Addon】Jan 28th 2021: Mymarkdown- immersive Markdown writing experience with support for Markdown, Latex, UML flowchart, and tables
【MN Third-Party Addon】Jan 28th 2021: Mymarkdown- immersive Markdown writing experience with support for Markdown, Latex, UML flowchart, and tables
4 of the Best Markdown Editors for macOS - Make Tech Easier
4 of the Best Markdown Editors for macOS - Make Tech Easier
Adding A Table In Microsoft Word
Adding A Table In Microsoft Word
What Is Markdown, and Why Is It Better for My To-Do Lists and Notes?
What Is Markdown, and Why Is It Better for My To-Do Lists and Notes?
Secret tip to create tables in MS Word
Secret tip to create tables in MS Word
How To Create A Table Of Contents In Microsoft Word
How To Create A Table Of Contents In Microsoft Word
How to add more rows to a table in Microsoft Word Document
How to add more rows to a table in Microsoft Word Document
I found the markdown editor that finally makes writing enjoyable again
I found the markdown editor that finally makes writing enjoyable again
HOW TO INSERT TABLE IN MS WORD
HOW TO INSERT TABLE IN MS WORD
How to format tables perfectly in Microsoft Word!
How to format tables perfectly in Microsoft Word!
How to add text in a table in word
How to add text in a table in word
How to Enable & Use the Markdown Editor in Reddit
How to Enable & Use the Markdown Editor in Reddit
Markdown editor
Markdown editor
an image of a table that has the words in it and some pictures on it
an image of a table that has the words in it and some pictures on it
How To Create a Clickable Table of Contents in Microsoft Word
How To Create a Clickable Table of Contents in Microsoft Word
Content Workflow Using Github And Markdown - Portent
Content Workflow Using Github And Markdown - Portent
Professional Markdown for developers: Part 1: Onboarding - Paperback
Professional Markdown for developers: Part 1: Onboarding - Paperback
How to create  a table of content in ms word
How to create a table of content in ms word
How to make a table of contents in word
How to make a table of contents in word

Now that you know how to create tables in Markdown, you can start using them in your documents, comments, and posts. Happy formatting!