---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://3y3.dev/en/syntax/tables/gfm.md
  - https://3y3.dev/ru/syntax/tables/gfm.md
  - href: en/syntax/tables/gfm.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
updatedAt: '2025-08-26T13:12:44.000Z'
---
> **Documentation Index:** Fetch the complete configuration index at https://3y3.dev/en/llms.txt

# GFM Tables

Tables with syntax similar to tables in GitHub Flavored Markdown. Suitable for simple tables with single-line content in cells.

{% note tip %}

To quickly create tables, you can use online generators. For example, [Tables Generator](https://www.tablesgenerator.com/markdown_tables).

{% endnote %}

A table consists of:

* A header row.
* A separator row.
* Rows with data.

The header row is separated from table cells by three or more `-` characters. Columns are separated by `|`.

```markdown
| Header 1  | Header 2  |
| ----------- | ----------- |
| Text       | Text       |
| Text       | Text       |
```

**Result**

| Header 1 | Header 2 |
| ----------- | ----------- |
| Text | Text |
| Text | Text |

In the table cells, you can use [line formatting](https://3y3.dev/en/syntax/base.md#line), [links](https://3y3.dev/en/syntax/links.md), [single-line code snippets](https://3y3.dev/en/syntax/code.md#inline), and [images](https://3y3.dev/en/syntax/media.md#images).

## Text alignment

Use the `:` symbol in the separator row to align the text in the columns to the left, right, or center.

```markdown
| Align left  | Align center        | Align right |
| :---            |      :----:      |            ---: |
| Text           | Text            | Text           |
| Text           | Text            | Text           |
```

**Result**

| Left-aligned | Centered | Right-aligned |
| :--- | :----: | ---: |
| Text | Text | Text |
| Text | Text | Text |

## Adding "sticky header" to a table

For tables, you can add a "sticky header". To do this, you need to add the `{sticky-header}` attribute after the table.

```markdown
| Header1   | Header2   |
| --------- | --------- |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
...
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |

{sticky-header}
```

**Результат**

| Header1   | Header2   |
| --------- | --------- |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |
| Text      | Text      |

{sticky-header}
