Deliminate text with pipes (|
) to create columns. A header row is defined when
the following row has at least three hyphens for each column header.
Header row | Second column of the header row |
---|---|
This is the first row | This is the second column of the first row |
This is the second row | This is the second column of the second row |
This is the third row | This is the second column of the third row |
Formatting text in a table
To align text within a column, add a colon :
in the dash ---
row to indicate
direction (e.g., left, center, right).
Left-aligned | Center-aligned | Right-aligned |
---|---|---|
info | info | info |
more info | more info | more info |
italics | code |
bold |
Readability with multi-line cells
Always start and close a row with either a pipe (|
) or a colon (:
). Use a
colon (:
) to wrap text in multi-line cells, and use HTML line breaks (<br/>
)
or paragraphs (<p>
) to create rendered line breaks.
Header one | Header two | Header three |
---|---|---|
Example one | Without line breaks | If you don't use HTML line breaks, the text is joined together in the cell. |
Example two | With line breaks |
If you use HTML
line breaks, the content appears on separate lines. |
Markdown table syntax
Use fenced code blocks when displaying Markdown table syntax.
Header | Header | Header
-------|--------|-------
info | info | info
When tables are indented as a code block, they are always rendered, like the one below.
Header | Header | Header |
---|---|---|
info | info | info |