# markdown: Add support for \`HTML\` table column \`align\` attribute \(\#41163\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/79ef10bfc36c63a944c004f4028cb6ba2bcb6552)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 79ef10bfc36c63a944c004f4028cb6ba2bcb6552

Requested commit: 79ef10bfc36c63a944c004f4028cb6ba2bcb6552

Commit: 79ef10bfc36c63a944c004f4028cb6ba2bcb6552

Tree: 8bad821ea930690ba1fb2b9faf7105e272a9406e

Author: Remco Smits

Committer: GitHub

## Message

````
markdown: Add support for `HTML` table column `align` attribute (#41163)

This PR allows you to define `align="right"` for example to change the
default alignment on **HTML** table columns. This PR also refactors
where we store the alignments in order to make it so you can define it
column based instead of only row based.

See that the `Revenue` column is left aligned instead of the default
`centered`.

**Result**

<img width="1161" height="177" alt="Screenshot 2025-10-25 at 11 01 38"
src="https://github.com/user-attachments/assets/94bda4f0-00c1-4726-a3bd-99b3f2573ef5"
/>


**Code example**

```HTML
<table>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2" align="left">Revenue</th>
        <th rowspan="2">Growth</th>
    </tr>
    <tr>
        <th>Q2 2024</th>
        <th>Q3 2024</th>
    </tr>
    <tr>
        <td>North America</td>
        <td>$2.8M</td>
        <td>$2.4B</td>
        <td>+85,614%</td>
    </tr>
    <tr>
        <td>Europe</td>
        <td>$1.2M</td>
        <td>$1.9B</td>
        <td>+158,233%</td>
    </tr>
    <tr>
        <td>Asia-Pacific</td>
        <td>$0.5M</td>
        <td>$1.4B</td>
        <td>+279,900%</td>
    </tr>
</table>
```

Release Notes:

- markdown preview: Add support for `HTML` table column `align`
attribute
````

## Parents

- [986ca19516e0b6b0b0a961e07f0f135a5292a827](https://git.cafe/gitcafe/zed/commit/986ca19516e0b6b0b0a961e07f0f135a5292a827?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/79ef10bfc36c63a944c004f4028cb6ba2bcb6552?format=markdown)
