Create & Manage Tables

Using Markdown

Creating a simple table

Creating a table in Discourse using Markdown is straightforward. Here’s a step-by-step guide:

  1. Start by defining the header:
  • The first row of your table will contain the headers for each column.
  • The second row separates the headers from the rest of the table.

Here is an example for a table with three columns:

| Col A | Col B | Col C |
|---|---|---|

This results in:

Col A Col B Col C
  1. Add rows of data:
  • Each row starts and ends with the | character.
  • Ensure the number of columns matches that of the header.

Example:

| Col A | Col B | Col C |
|---|---|---|
| A1 | B1 | C1 |
| A2 | B2 | :smile: |

This results in:

Col A Col B Col C
A1 B1 C1
A2 B2 :smile:

Alignment

You can control the alignment of column contents with colons (:):

  • Left-aligned: |:---|
  • Center-aligned: |:---:|
  • Right-aligned: |---:|

Example:

| Left | Center | Right |
|:---|:---:|---:|
| My content is on the left | I'm the center of the world | I like being on the right side |
| :waxing_gibbous_moon: | :full_moon: | :waning_gibbous_moon: |

This results in:

Left Center Right
My content is on the left I’m the center of the world I like being on the right side
:waxing_gibbous_moon: :full_moon: :waning_gibbous_moon:

Clickable links in Tables

Adding clickable links within tables can be useful for directing users to specific resources or external content.

To include a clickable link, use the standard Markdown link syntax within a table cell. The format is [Link Text](URL).

Example:

| Column A | Column B | Column C |
|---|---|---|
| [Google](https://www.google.com) | Example Text | Another Link |

This results in:

Column A Column B Column C
Google Example Text Another Link