Markdown - Slack

This tutorial covers Markdown table with examples..

Markdown in slack

Slack is instant messaging application. Slack has one to one and team collaboration using channels. Markdown in slack are not supported but can be used in messages and posts of slack

Users of slack supports plain text messages

Slack can be customized Create a channel Custom app creation

Tables containers rows and columns and headers, can be created using Pipe operator ! and dash symbols -. Headers are created using minimum of three hypens, Columns of data or header can be separated by pipe symbol.

here is a table syntax

|Header1 |Header2  | Header3|
--- | --- | ---

following is generated html code


Output generated in browser is

data1 data2data3

Some of the rules of markdown tables

  • Header are separated by pipes
  • tables with out header are not supported in core specification
  • Minium of 3 dashes under each header name is required, can declare more than three dashes
  • Pipes symbol is optional, but use for readability
  • Each column of row data is separated by pipe symbol
  • There can be multiple rows pipe symbole on row start and end are optional.
  • table’s data like header and row can contain simple text or markdown content

Include content format styles

table cell data can include all other markdown content styles like links,bold if cell content wants to include pipe or backtick symbol,symbols needs to be escaped.

table data can include

|Header1 |Header2  | Header3|
|--- | --- | ---|
|**bold style**| `code block`|data3|
|\|escape pipe|\`backtick|data13|

Output is

bold stylecode blockitalic
|escape pipe`backtickdata13

Align cell data using colon symbol

header and cell data can be aligned to left or right of a columns in a table Below example explains about alighment

  • Content to align left by prefix colon : before dashes - :---
  • Right align by suffix colon : after dashes - ---:
  • Center align by prefix and suffix colon : for dashes - :---:
|Header1 |Header2  | Header3|
|:--- | ---: | :---:|
|Aligh left| Alighn right|center text|
|cell data1|cell data2|cell data3|

Example for align table data

Aligh leftAlighn rightcenter text
cell data1cell data2cell data3