Is there any markdown to create tables?
There have already been a few questions which have requested this feature, so I just wanted to check on the status of them and (hopefully) renew some interest:
- Please add support for tables in answers and questions
- Easier way to represent DB tables when asking DB questions
- Is there any markdown to create tables?
Despite the excellent points raised in these questions, the request for a new way to format tables in questions seems to have died down, and responding to database-related questions is still a pain in the neck. There isn't any available syntax available to represent tables visually, apart from employing ASCII art skillz:
Header1 | Header2 | Header 3 --------+---------+---------- 0 | 1 | 7 2 | 5 | 3 9 | 7 | 2
Or even, as Jeff has suggested, using even more ornate ASCII formatting:
╔════╦══════════════╦══════╗ ║ -1 ║ Community ║ 210 ║ ╠════╬══════════════╬══════╣ ║ 1 ║ Jeff Atwood ║ 5636 ║ ║ 2 ║ Geoff Dalgas ║ 148 ║ ║ 3 ║ Jarrod Dixon ║ 101 ║ ║ 4 ║ Joel Spolsky ║ 959 ║ ╚════╩══════════════╩══════╝
But I really can't understand how this functions as a sustainable solution. It seems so time-consuming and wasteful to keep using this method because it is, after all, just a stopgap solution. Jeff has also pointed out that
<table> tags are explicitly prohibited on Stack Exchange sites, but that doesn't necessarily mean table syntax is doomed to a hopeless future of 1990's style .txt ASCII artwork; why can't we use a modified form of tags which can be easily controlled:
[table] [row] [cell]Hello[/cell] [/row] [/table]
These won't break the overall layout of the site if a user forgets the closing tag(s). Wordpress uses this kind of syntax, so why can't SO? Or, everyone wants to stick clear of BBCode, why don't you just keep it very simple:
--- can indicate the beginning or the end of a table
New lines indicate new table rows
| can delimit table cells
i.e. something like:
--- Header1 | Header2 | Header 3 0 | 0 | 0 2 | 3 | 4 ---
And this would automatically be converted into a HTML table (it wouldn't just stay as a textual representation). An instant benefit would be that you don't have to spend so much time padding out the columns to emulate the look of a real table.