Tables
The table element can span multiple rows or columns for layout or organizational needs and provides control over the display properties of data and table structure. The numbering of the tables can be auto-populated during publishing.
Table <table>
Below are tables without a <title> or a description <desc>. The first has a header row, the second does not.
| Column 1 | Column 2 (centered) |
|---|---|
| Entry name 1 | Entry value 1 |
| Entry name 2 | Entry value 2 |
| Entry name 3 | Entry value 3 |
This is a paragraph <p> intended to show the spacing between tables and lines of text.
| Entry name 1 | Entry value 1 |
| Entry name 2 | Entry value 2 |
| Entry name 3 | Entry value 3 |
Table with Title
Below is a table with a <title> only.
| Name | Team | Years Pro | Active? |
|---|---|---|---|
| Michael Jordan | Chicago Bulls | 99 | No |
| LeBron James | Los Angeles Lakers | 20 | Yes |
| Kobe Bryant | Los Angeles Lakers | 17 | No |
Table with Title & Description
Below is a table with both a <title> and a description <desc>. The description can be styled like a caption.
| Feature | Description |
|---|---|
| Responsive Layout | Adapts to different screen sizes. |
| Accessibility | Supports header relationships when table headers are defined. |
Simple Table
The simpletable element provides a lightweight table structure for simple rows and columns.
| Element | Purpose | Styling Test |
|---|---|---|
simpletable |
Contains the simple table. | Outer table styling |
sthead |
Contains simple table header entries. | Header styling |
stentry |
Contains a simple table cell. | Cell padding and borders |
Column Width Testing with Colspec
This table explicitly uses colspec width definitions to test column sizing behavior. All other tables in this topic omit colspec so this section is the clear column-width test case.
| Narrow Column | Wide Content Column | Narrow Column |
|---|---|---|
| ID-001 | This wider column contains a much larger amount of text intended to demonstrate proportional column sizing behavior in HTML and PDF outputs. | Active |
| ID-002 | Additional long-form content used to validate wrapping, alignment, and proportional width rendering. | Pending |
Table with Rich Content
A table cell can contain block-level content inside table cells, including paragraphs, lists, notes, and inline formatting.
| Element | Example |
|---|---|
Unordered list <ul> |
|
Ordered list <ol> |
|
Paragraph <p> |
This cell contains a paragraph with bold text, italic text, and |
Note <note> |
Important: This note appears inside a table cell.
|
Code <codeblock> |
CODE
|
Table with Spanning Rows and Columns
Below is a table that joins cells that span multiple columns and rows.
| Column 1 | Column 2 | Column 3 | Column 4 |
|---|---|---|---|
| Entry 1 | Entry 2 | Entry 3 | Entry 4 |
| Cells merged into one row | |||
| Entry 5 | Entry 6 | Entry 7 | Entry 8 |
| Entry 9 | Entry 10 | Entry 11 | Entry 12 |
| Entry 13 | Entry 14 | Cells joined to row above | Cells joined to row above |
| Entry 15 | Entry 16 | ||
| Entry 19 | Entry 20 | Entry 21 | Entry 22 |
Wide Table
This table tests horizontal spacing, wrapping, and responsive behavior for many columns.
| Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Long Description Column |
|---|---|---|---|---|---|---|---|
| A1 | A2 | A3 | A4 | A5 | A6 | A7 | This longer cell tests wrapping behavior in a wide table. |
| B1 | B2 | B3 | B4 | B5 | B6 | B7 | This cell contains additional text to test how the final column wraps across multiple lines. |
Table Frame and Rules
This table tests frame and row separator styling.
| Header A | Header B | Header C |
|---|---|---|
| Row 1, Cell A | Row 1, Cell B | Row 1, Cell C |
| Row 2, Cell A | Row 2, Cell B | Row 2, Cell C |