News
Easy Way to Create a Markdown Table
Markdown is a lightweight markup language for publishing content on the web. It uses easy to understand plain text formatting syntax to create tidy HTML via the use of a simple Perl script.
Since then, many flavors of Markdown have appeared. While tables did not appear in the original specification, most Markdown editors now support them, and they’re easy to implement. We’ll show you how to create a Markdown table from scratch and resources that can speed up the process.
Markdown Parsers
The original Markdown parser was written in Perl with core features parsing block elements (paragraphs, line breaks, headers, lists, code blocks) and span elements (links, emphasis, images). With the rise in the trend of Markdown usage, several parsers were seen with support for different implementations. They include GitHub Flavored Markup, Markdown Extra, MultiMarkdown, and CommonMark.
Many Markdown editors and online platforms support tables with the help of GitHub Flavored Markup and Markdown Extra. Both implementations use the same formatting, so you don’t have to remember the different syntax for different languages. The Markdown table syntax is also robust, easy to use, and doesn’t require a complicated system to create a table.
Subsequent efforts to standardize Markdown have been made, with the most significant being CommonMark. Although this implementation of Markdown does not include the native support for tables, future iterations will include some basic rules.
How to Create a Markdown Table
A table in Markdown consists of two parts: the header and the rows of data in the table. As per the Markdown spec:
- pipe (|) character separates the individual columns in a table.
- (-) hyphens act as a delimiter row to separate the header row from the body.
- (:) colon to align cell contents.
Header
As you notice from the screenshot, the header of a table consists of two rows. The first row is the column header, wherein spaces and pipes separate each header. The second row is a delimiter row for the table that determines how the text will be vertically aligned.
There must be at least three hyphens in each column of the header row. You can increase the hyphens or spaces for readability. To left-align a column, put a colon to the left of the hyphen (:—). Put a colon to the right of the hyphen (—:) to right-align a column. To center-align, surround the hyphen with two colons on both sides (:—:). We’ll also wrap the second row with pipes.
Body and Markdown Formatting
The body of the table consists of any number of rows separated by line breaks. Just like the header, every cell is separated by a pipe. Within each table cell, you can use Markdown formatting syntax like italics, bold, links, images, and inline code blocks.
It is possible to insert a pipe character in the cell as long as you precede them with a backslash. You can even use the <br /> tag to force cells to span multiple lines. Although, remember that Markdown tables will automatically wrap for cells that contain a lot of text.
Markdown Table Generators
While the syntax for creating Markdown tables is easy to remember and implement, it is a tedious and time-consuming process. If you would rather not jostle with formatting table, a Markdown table generator might be of great use.
Tables Generator
It’s probably the simplest website of its kind, with a full set of tools for creating Markdown tables and exporting them to Markdown. To get started, go to File and choose New Table. From the dialog box that appears, select the number of rows (valid range 1–500) and columns (valid range 1–20). And click Create.
Double-click on a field to add content. Then, press Tab to move between the fields. You can use the alignment tool at the top to align the contents of your table. The tool even allows you to align cells independent of the column rule, since it inserts the right number of spaces and hyphens before or after the field content, to ensure the table is formatted properly.
In the final step, click the Generate button to see the result. Click the Copy to clipboard button, then paste the table into your document. Check the Compact mode to condense the table and save space. You can even import a .CSV file via File > Import CSV file and convert it into Markdown.
Table Convert
It’s an intuitive online tool to convert from CSV to Markdown Table. Drag-and-drop the table data or upload a CSV file in the Data Source field. The table editor is a full-fledged editor for editing tables. It includes commands like Undo, Redo, Transpose, Find and Replace, and more.
The table generator shows the Markdown table preview. Check Bold first row to bold the header row. Make sure you check Pretty-print your Markdown for better readability and more space in the table. At last, click Copy to clipboard to copy the table into your document or download it as a Markdown file.
Table Implementation in Markdown Apps
While Markdown table generators are indeed useful, a recent trend has been seen in apps to let you create a table, just like you do in Microsoft Word. I’ll give you an example of two third-party apps with a built-in table generator.
Typora
To create a table in Typora, go to Paragraph > Table > Insert Table. From the dialog box that appears, type in the number of rows and columns. Right-click on a table cell, then choose Table > Add Row Below or Add Columns Before or After.
You can even resize the table and align the contents through the alignment tool located at the top of the table. It’s also possible to reorder rows/columns. Click on the left/top border of a row or column and use drag-and-drop to move it. Here are some of the reasons why Typora is my favorite editor.
Zettlr
The built-in table editor lets you edit the tables seamlessly and instantly convert the Markdown source into HTML. Go to Preferences > Editor and check Enable Table Editor. Click into any of the cells and start adding your content. You can use the Tab, Arrow keys to navigate the table.
Then add rows or columns with the table editor’s edge buttons. These buttons will appear when you hover over the table. Do remember that when you’re inside any of the table cells, you’re in editing mode. To save your changes, make sure to click outside of the table.
Master Markdown Today
Having knowledge of Markdown is a great skill to add to your digital publishing repertoire. Whether you’re posting comments on Reddit, writing a readme for the GitHub platform, or thinking of starting a blog, this simplified markup language is intuitive and versatile.
When you pair it with the right Markdown editor, you can convert it into another format like HTML, PDF, or more. You just need a bit of time and practice to remember Markdown syntax. To know more, read our guide on how to use Markdown.






