Creating a Table in a post

how-to

(Give me bacon, or give me death.) #1

Continuing the discussion from New how to: create tables:

How to create a table in Markdown:

Format your information thusly, but without the quotation marks:
“| A | B | C |”
“| — | — | — |”
“| 12 | 3 | 544 |”
“| 346 | 67 | 2 |”

The result:

A B C
12 3 544
346 67 2

(Wendy) #2

I want to try:
| Mon | | Tue | | Wed |
|–| |–| |–|
| Bacon | | Steak | | Ribeye |
| 3 | | 2 | | 1 |


(Wendy) #3

Epic fail. :yum: What am I doing wrong? I’ve tried re editing it several times. Doing different spacing.


(Robert C) #4

You have:
| Mon | | Tue | | Wed |
|-| |-| |-|
| Bacon | | Steak | | Ribeye |
| 3 | | 2 | | 1 |

To make it work - you need a single vertical bar everywhere.
For example - between Mon and Tue - you have “| |” but you need just “|” to get…

Mon Tue Wed
Bacon Steak Ribeye
3 2 1

(Diane) #5

Okay. Now I’m trying.

Mon Tue Wed
111 222 333

(Diane) #6

Cool!


(Wendy) #7

Ah, I totally didn’t see I’d done that differently. Funny how blind we can be.


(Wendy) #8
Thu Fri Sat
Chicken Shrimp eggs
4 5 6

(Michael - When reality fails to meet expectations, the problem is not reality.) #9

But, what if you want a blank ‘cell’?

“| A | B | C |”
“| — | — | — |” <- this actually 3 hyphens (or more)
“| 12 | | 544 |”
“| 346 | 67 | 2 |”

Result:

A B C
12 544
346 67 2