---
title: "Element <row>"
source: https://dev.pageseeder.com/psml/elements/element-row.html
description: "PSML Element reference for <row>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~807
---

# \<row\>

## Summary

The `<row>` element.

## Usage context

| Element category | table |
| --- | --- |
| PSML level | portable |
| Permitted content | `<cell> <hcell>`<sup>\*</sup> |
| Permitted parent | `<table>` |
| HTML equivalent | `<tr>` |
| OpenXML equivalent | `<w:tr>` |

\* There is deprecation warning on the `<hcell>` element.

## Attributes

This element includes the following attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| align | [align-horizontal](../datatypes/pageseeder_datatypes.md) | no | Horizontal alignment for all cells in the row |
| part | [table-part](../datatypes/pageseeder_datatypes.md) | no | Mark the row as part of the header or footer |
| role | [role](../datatypes/pageseeder_datatypes.md) | no | Custom value that can be used for formatting |

### `@align`

Horizontal alignment of the text within the cells in the row.

Possible values are the following:

- `center`
- `justify`
- `left`
- `right`

### `@part` 

The part of the table this row belongs to.

Possible values are:

- `body` – implied default value for a row provided for completeness (it needn’t be used).
- `header` – when the row is part of the table header.
- `footer` – when the row is part of the table footer.

When a row is part of the header or footer, its cells have a different function. In HTML, they are part of the `<thead>` or `<tfoot>`. In tables spanning multiple pages, they are be repeated on each page. When dynamic behavior is applied on the table (for example, sorting, computing, or sums), the cells are excluded from the sorting algorithm.

### `@role`

A custom value to provide semantics for the cell. This can be used for formatting.

## Examples

###  

A table with a header and footer row.

```lang-xml

<table>
  <row part="header">
    <cell>Team</cell>
    <cell>Points</cell>
  </row>
  <row>
    <cell>A</cell>
    <cell>54</cell>
  </row>
  <row>
    <cell>B</cell>
    <cell>46</cell>
  </row>
  <row part="footer">
    <cell>Total</cell>
    <cell>100</cell>
  </row>
</table>
```

Displays in HTML as:

```lang-html

<table>
  <thead>
    <tr>
      <th>Team</th>
      <th>Points</th>
    </tr>
   </thead>
  <tbody>
    <tr>
      <td>A</td>
      <td>54</td>
    </tr>
    <tr>
      <td>B</td>
      <td>46</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>Team</td>
      <td>Points</td>
    </tr>
  </tfoot>
</table>
```

And renders as:

| Team | Points |
| --- | --- |
| A | 54 |
| B | 46 |
| Team | Points |

## Schema

### XML Schema

```lang-xml

<xs:element  name="row">
  <xs:complexType>
    <xs:choice maxOccurs="unbounded">
      <xs:element ref="cell"/>
      <xs:element ref="hcell"/>
    </xs:choice>
    <xs:attribute name="align" type="xs:string"/>
    <xs:attribute name="part" type="xs:string"/>
    <xs:attribute name="role" type="role"/>
  </xs:complexType>
</xs:element>
```

### Relax Schema

```lang-relax

row = element row {
   attribute role { role }?,
   attribute align { "center" | "justify" | "left" | "right" }?,
   attribute part { "header" | "body" | "footer" }?,
   (cell | hcell)+
 }
```

## Compatibility

This element was introduced in the first draft of PSML and is well-supported from PageSeeder 5.1.

