> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# TableHeader extension

export const SourceCodeLink = ({extension, path}) => {
  const githubPath = path || `packages/super-editor/src/editors/v1/extensions/${extension.toLowerCase()}`;
  const githubUrl = `https://github.com/superdoc-dev/superdoc/tree/main/${githubPath}`;
  return <div>
      <p>
        <a href={githubUrl} target="_blank" rel="noopener noreferrer">
          View on GitHub →
        </a>
      </p>
    </div>;
};

Semantic header cell with built-in styling.

Created via `insertTable({ withHeaderRow: true })` or toggle commands. See [Table extension](/extensions/table).

## OOXML Structure

```xml theme={null}
<w:tc>
  <w:tcPr>
    <w:tcW w:w="2880" w:type="dxa"/>
    <w:cnfStyle w:val="100000000000"/>  <!-- Header cell styling -->
  </w:tcPr>
  <w:p>
    <w:pPr>
      <w:pStyle w:val="TableHeader"/>   <!-- Header paragraph style -->
    </w:pPr>
    <w:r>
      <w:rPr>
        <w:b/>                           <!-- Bold by default -->
      </w:rPr>
      <w:t>Header text</w:t>
    </w:r>
  </w:p>
</w:tc>
```

## Options

Configure the extension behavior:

<ParamField path="htmlAttributes" type="Object" default="{'aria-label':'Table head node'}">
  HTML attributes for table headers
</ParamField>

## Attributes

Node attributes that can be set and retrieved:

<ParamField path="colspan" type="number" default="1">
  Number of columns this header spans
</ParamField>

<ParamField path="rowspan" type="number" default="1">
  Number of rows this header spans
</ParamField>

<ParamField path="colwidth" type="Array<number>">
  Column widths array in pixels
</ParamField>

## Source code

<SourceCodeLink path="packages/super-editor/src/editors/v1/extensions/table-header/table-header.js" />
