# markdown: Add support for \`HTML\` table captions \(\#41192\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 760747f127d44d682467eef271a68b24a92e493b

Requested commit: 760747f127d44d682467eef271a68b24a92e493b

Commit: 760747f127d44d682467eef271a68b24a92e493b

Tree: b145f93ce718f756e6d8319826bcf71b5a3bddd8

Author: Remco Smits

Committer: GitHub

## Message

````
markdown: Add support for `HTML` table captions (#41192)

Thanks to @Angelk90 for pointing out that, we were missing this feature.
So this PR implement the caption feature for HTML tables for the
markdown preview.

**Code example**
```html
<table>
    <caption>Revenue by Region</caption>
    <tr>
        <th rowspan="2">Region</th>
        <th colspan="2">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>
```

**Result**:
<img width="1201" height="774" alt="Screenshot 2025-10-25 at 21 18 01"
src="https://github.com/user-attachments/assets/c2a8c1c2-f861-40df-b5c9-549932818f6e"
/>

Release Notes:

- Markdown preview: Added support for `HTML` table captions
````

## Parents

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

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