Chilkat HtmlToText → Plain Text: Table Conversion Gallery
The improved conversion of HTML tables to plain text is new in Chilkat v11.6.0. Each case below shows the source HTML table as rendered by the browser, its raw HTML source, and the plain-text produced by Chilkat HtmlToText. These 25 cases stress the hardest table-to-text situations: uneven cells, block content in cells, nested tables, spans, alignment, entities, and delimiter collisions.
New in Chilkat v11.6.0 25 table conversion casesUneven big vs tiny
01_uneven_big_vs_tiny.html
a paragraph-sized Description column beside 1–2 char ID/Qty columns. Column widths can't be uniform; the wide cell must wrap while the tiny cells stay put.
| ID | Description | Qty |
|---|---|---|
| 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | 3 |
| 2 | Short one. | 10 |
| 3 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | 1 |
<body>
<table border="1">
<tr>
<th>ID</th>
<th>Description</th>
<th>Qty</th>
</tr>
<tr>
<td>1</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>Short one.</td>
<td>10</td>
</tr>
<tr>
<td>3</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
<td>1</td>
</tr>
</table>
</body>
+----+-------------------------------------------------------------------+-----+ | ID | Description | Qty | +====+===================================================================+=====+ | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | 3 | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut | | | | enim ad minim veniam, quis nostrud exercitation ullamco laboris | | | | nisi ut aliquip ex ea commodo consequat. | | +----+-------------------------------------------------------------------+-----+ | 2 | Short one. | 10 | +----+-------------------------------------------------------------------+-----+ | 3 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | 1 | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut | | | | enim ad minim veniam, quis nostrud exercitation ullamco laboris | | | | nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit | | | | amet, consectetur adipiscing elit, sed do eiusmod tempor | | | | incididunt ut labore et dolore magna aliqua. Ut enim ad minim | | | | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | | | | ex ea commodo consequat. | | +----+-------------------------------------------------------------------+-----+
Wide column exceeds margin
02_wide_column_exceeds_margin.html
a 2-column key/value table where the value column alone exceeds the 80-char right margin. Tests wrapping *within* a column vs. blowing past the margin.
| Key | Value |
| summary | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
| notes | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
<body>
<table>
<tr>
<td>Key</td>
<td>Value</td>
</tr>
<tr>
<td>summary</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
</tr>
<tr>
<td>notes</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
</tr>
</table>
</body>
+---------+--------------------------------------------------------------------+ | Key | Value | +---------+--------------------------------------------------------------------+ | summary | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut | | | enim ad minim veniam, quis nostrud exercitation ullamco laboris | | | nisi ut aliquip ex ea commodo consequat. | +---------+--------------------------------------------------------------------+ | notes | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut | | | enim ad minim veniam, quis nostrud exercitation ullamco laboris | | | nisi ut aliquip ex ea commodo consequat. | +---------+--------------------------------------------------------------------+
Cells with blocks
03_cells_with_blocks.html
cells contain <h3> + multiple <p>. A cell is now multi-line block content, not a value; where do the paragraph breaks go relative to the row?
Section AFirst paragraph in the cell. Second paragraph in the cell. | Section BOnly one paragraph here. |
<body>
<table>
<tr>
<td>
<h3>Section A</h3>
<p>First paragraph in the cell.</p>
<p>Second paragraph in the cell.</p>
</td>
<td>
<h3>Section B</h3>
<p>Only one paragraph here.</p>
</td>
</tr>
</table>
</body>
+-------------------------------+--------------------------+ | SECTION A | SECTION B | | | | | First paragraph in the cell. | Only one paragraph here. | | | | | Second paragraph in the cell. | | +-------------------------------+--------------------------+
Cells with lists
04_cells_with_lists.html
cells contain <ul>/<ol>. List markers + indentation inside a table cell; interacts with the list-marker bookkeeping.
| Feature | Details |
|---|---|
| Fruits |
|
| Steps |
|
<body>
<table>
<tr>
<th>Feature</th>
<th>Details</th>
</tr>
<tr>
<td>Fruits</td>
<td>
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Cherry</li>
</ul>
</td>
</tr>
<tr>
<td>Steps</td>
<td>
<ol>
<li>Wash</li>
<li>Peel</li>
<li>Slice</li>
</ol>
</td>
</tr>
</table>
</body>
+---------+----------+ | Feature | Details | +=========+==========+ | Fruits | * Apple | | | * Banana | | | * Cherry | +---------+----------+ | Steps | 1. Wash | | | 2. Peel | | | 3. Slice | +---------+----------+
Nested table in cell
05_nested_table_in_cell.html
a full 2×2 table inside one cell of an outer table. The inner table's own row/column layout must survive inside a column of the outer one.
| Outer left |
| Outer right |
<body>
<table>
<tr>
<td>Outer left</td>
<td>
<table>
<tr>
<td>inner-1a</td>
<td>inner-1b</td>
</tr>
<tr>
<td>inner-2a</td>
<td>inner-2b</td>
</tr>
</table>
</td>
<td>Outer right</td>
</tr>
</table>
</body>
+------------+-------------------------+-------------+ | Outer left | +----------+----------+ | Outer right | | | | inner-1a | inner-1b | | | | | +----------+----------+ | | | | | inner-2a | inner-2b | | | | | +----------+----------+ | | +------------+-------------------------+-------------+
Cells with links
06_cells_with_links.html
links in cells, including links wrapped in (...)/punctuation and a mailto:. Combines the table problem with the link-spacing and References behavior.
| Site | Description |
|---|---|
| Alpha | See (docs), or the API. |
| Beta | Contact beta@example.com! |
<body>
<table>
<tr>
<th>Site</th>
<th>Description</th>
</tr>
<tr>
<td><a href="https://a.example.com/">Alpha</a></td>
<td>See (<a href="https://a.example.com/docs">docs</a>), or the <a href="https://a.example.com/api">API</a>.</td>
</tr>
<tr>
<td><a href="https://b.example.com/">Beta</a></td>
<td>Contact <a href="mailto:beta@example.com">beta@example.com</a>!</td>
</tr>
</table>
</body>
+----------+----------------------------------+ | Site | Description | +==========+==================================+ | Alpha[1] | See ( docs[2] ), or the API[3] . | +----------+----------------------------------+ | Beta[4] | Contact beta@example.com[5] ! | +----------+----------------------------------+ References: [1] https://a.example.com/ [2] https://a.example.com/docs [3] https://a.example.com/api [4] https://b.example.com/ [5] mailto:beta@example.com
Cells with br and inline
07_cells_with_br_and_inline.html
address-style cells using <br> for internal lines plus <b>. Multi-line cell content driven by <br> rather than block tags.
| Name | Address |
|---|---|
| Acme Corp | 123 Main St Suite 400 Springfield, IL 62704 |
| Globex | 1 Industrial Way Ogdenville |
<body>
<table>
<tr>
<th>Name</th>
<th>Address</th>
</tr>
<tr>
<td><b>Acme Corp</b></td>
<td>123 Main St<br>Suite 400<br>Springfield, IL 62704</td>
</tr>
<tr>
<td><b>Globex</b></td>
<td>1 Industrial Way<br>Ogdenville</td>
</tr>
</table>
</body>
+-----------+-----------------------+ | Name | Address | +===========+=======================+ | Acme Corp | 123 Main St | | | Suite 400 | | | Springfield, IL 62704 | +-----------+-----------------------+ | Globex | 1 Industrial Way | | | Ogdenville | +-----------+-----------------------+
Multiparagraph uneven
08_multiparagraph_uneven.html
a 3-paragraph cell beside a 1-word cell in the same row. Extreme height mismatch; row alignment/padding decisions become visible.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | Tiny. |
<body>
<table>
<tr>
<td>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</td>
<td>
<p>Tiny.</p>
</td>
</tr>
</table>
</body>
+----------------------------------------------------------------------+-------+ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | Tiny. | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim | | | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut | | | aliquip ex ea commodo consequat. | | | | | | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim | | | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut | | | aliquip ex ea commodo consequat. | | | | | | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim | | | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut | | | aliquip ex ea commodo consequat. | | +----------------------------------------------------------------------+-------+
Many columns
09_many_columns.html
10 columns. Horizontal overflow: 10 columns cannot fit in 80 chars, so a column renderer must truncate, wrap, or fall back.
| Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 |
|---|---|---|---|---|---|---|---|---|---|
| v1 | v2 | v3 | v4 | v5 | v6 | v7 | v8 | v9 | v10 |
| data1 | data2 | data3 | data4 | data5 | data6 | data7 | data8 | data9 | data10 |
<body>
<table>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
<th>Col5</th>
<th>Col6</th>
<th>Col7</th>
<th>Col8</th>
<th>Col9</th>
<th>Col10</th>
</tr>
<tr>
<td>v1</td>
<td>v2</td>
<td>v3</td>
<td>v4</td>
<td>v5</td>
<td>v6</td>
<td>v7</td>
<td>v8</td>
<td>v9</td>
<td>v10</td>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
<td>data3</td>
<td>data4</td>
<td>data5</td>
<td>data6</td>
<td>data7</td>
<td>data8</td>
<td>data9</td>
<td>data10</td>
</tr>
</table>
</body>
+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+ | Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 | +=======+=======+=======+=======+=======+=======+=======+=======+=======+========+ | v1 | v2 | v3 | v4 | v5 | v6 | v7 | v8 | v9 | v10 | +-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+ | data1 | data2 | data3 | data4 | data5 | data6 | data7 | data8 | data9 | data10 | +-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+
Colspan rowspan
10_colspan_rowspan.html
colspan/rowspan. The visual grid the author intended is NOT the raw cell sequence; a flattener that ignores spans mis-associates data. (Also check whether the XML even preserves the span attributes.)
| Merged Header Across Two Columns | Third | |
|---|---|---|
| Spans two rows | B1 | C1 |
| B2 | C2 | |
<body>
<table border="1">
<tr>
<th colspan="2">Merged Header Across Two Columns</th>
<th>Third</th>
</tr>
<tr>
<td rowspan="2">Spans two rows</td>
<td>B1</td>
<td>C1</td>
</tr>
<tr>
<td>B2</td>
<td>C2</td>
</tr>
</table>
</body>
+----------------------------------+-------+ | Merged Header Across Two Columns | Third | +===========================+======+=======+ | Spans two rows | B1 | C1 | | |------+-------+ | | B2 | C2 | +---------------------------+------+-------+
Cells with pre
11_cells_with_pre.html
<pre> code blocks inside cells. Preformatted whitespace/newlines must be preserved *and* kept within the cell's column.
| Language | Example |
|---|---|
| Python | def add(a, b):
return a + b |
| Shell | for i in 1 2 3; do echo $i done |
<body>
<table>
<tr>
<th>Language</th>
<th>Example</th>
</tr>
<tr>
<td>Python</td>
<td>
<pre>def add(a, b):
return a + b</pre>
</td>
</tr>
<tr>
<td>Shell</td>
<td>
<pre>for i in 1 2 3; do
echo $i
done</pre>
</td>
</tr>
</table>
</body>
+----------+--------------------+ | Language | Example | +==========+====================+ | Python | def add(a, b): | | | return a + b | +----------+--------------------+ | Shell | for i in 1 2 3; do | | | echo $i | | | done | +----------+--------------------+
Cells with images
12_cells_with_images.html
one image with alt="OK", one with no alt. Cell may render as alt text, a placeholder, or nothing — and an empty cell still needs a column position.
| Icon | Label |
|---|---|
![]() | Passed |
![]() | Failed (image has no alt text) |
<body>
<table>
<tr>
<th>Icon</th>
<th>Label</th>
</tr>
<tr>
<td><img src="check.png" alt="OK"></td>
<td>Passed</td>
</tr>
<tr>
<td><img src="x.png"></td>
<td>Failed (image has no alt text)</td>
</tr>
</table>
</body>
+------+--------------------------------+ | Icon | Label | +======+================================+ | | Passed | +------+--------------------------------+ | | Failed (image has no alt text) | +------+--------------------------------+
Empty and full cells
13_empty_and_full_cells.html
empty cells interleaved with full ones, including an all-empty row. Tests placeholder/padding so columns don't collapse or shift.
| A | B | C |
|---|---|---|
| filled | filled | |
| middle | ||
<body>
<table>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
<tr>
<td>filled</td>
<td>
</td>
<td>filled</td>
</tr>
<tr>
<td>
</td>
<td>middle</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</body>
+--------+--------+--------+ | A | B | C | +========+========+========+ | filled | | filled | +--------+--------+--------+ | | middle | | +--------+--------+--------+ | | | | +--------+--------+--------+
Numeric alignment
14_numeric_alignment.html
currency/quantity columns plus a totals row with empty cells. Right-alignment of numbers and a Grand Total row are where stacking looks worst.
| Item | Unit Price | Qty | Total |
|---|---|---|---|
| Widget | $1,299.00 | 3 | $3,897.00 |
| Gadget | $49.95 | 120 | $5,994.00 |
| Sprocket | $0.10 | 10,000 | $1,000.00 |
| Grand Total | $10,891.00 |
<body>
<table>
<tr>
<th>Item</th>
<th>Unit Price</th>
<th>Qty</th>
<th>Total</th>
</tr>
<tr>
<td>Widget</td>
<td>$1,299.00</td>
<td>3</td>
<td>$3,897.00</td>
</tr>
<tr>
<td>Gadget</td>
<td>$49.95</td>
<td>120</td>
<td>$5,994.00</td>
</tr>
<tr>
<td>Sprocket</td>
<td>$0.10</td>
<td>10,000</td>
<td>$1,000.00</td>
</tr>
<tr>
<td>Grand Total</td>
<td>
</td>
<td>
</td>
<td>$10,891.00</td>
</tr>
</table>
</body>
+-------------+------------+--------+------------+ | Item | Unit Price | Qty | Total | +=============+============+========+============+ | Widget | $1,299.00 | 3 | $3,897.00 | +-------------+------------+--------+------------+ | Gadget | $49.95 | 120 | $5,994.00 | +-------------+------------+--------+------------+ | Sprocket | $0.10 | 10,000 | $1,000.00 | +-------------+------------+--------+------------+ | Grand Total | | | $10,891.00 | +-------------+------------+--------+------------+
Huge cell wrapping
15_huge_cell_wrapping.html
a single cell with ~4 paragraphs of Lorem. One cell dominates the whole table; wrapping and column width must cope with one enormous cell.
| Topic | Explanation |
|---|---|
| Overview | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
<body>
<table>
<tr>
<th>Topic</th>
<th>Explanation</th>
</tr>
<tr>
<td>Overview</td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
</tr>
</table>
</body>
+----------+-------------------------------------------------------------------+ | Topic | Explanation | +==========+===================================================================+ | Overview | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do | | | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut | | | enim ad minim veniam, quis nostrud exercitation ullamco laboris | | | nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit | | | amet, consectetur adipiscing elit, sed do eiusmod tempor | | | incididunt ut labore et dolore magna aliqua. Ut enim ad minim | | | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | | | ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur | | | adipiscing elit, sed do eiusmod tempor incididunt ut labore et | | | dolore magna aliqua. Ut enim ad minim veniam, quis nostrud | | | exercitation ullamco laboris nisi ut aliquip ex ea commodo | | | consequat. Lorem ipsum dolor sit amet, consectetur adipiscing | | | elit, sed do eiusmod tempor incididunt ut labore et dolore magna | | | aliqua. Ut enim ad minim veniam, quis nostrud exercitation | | | ullamco laboris nisi ut aliquip ex ea commodo consequat. | +----------+-------------------------------------------------------------------+
Cells with blockquote hr
16_cells_with_blockquote_hr.html
a <blockquote> in one cell and an <hr> in another. Block decorations (indented quote, dashed rule) inside a cell column.
Quote cell:To be or not to be. | Rule cell: after the rule |
<body>
<table>
<tr>
<td>
Quote cell:
<blockquote>To be or not to be.</blockquote>
</td>
<td>
Rule cell:
<hr>
after the rule
</td>
</tr>
</table>
</body>
+---------------------+---------------------------+ | Quote cell: | Rule cell: after the rule | | | | | To be or not to be. | | +---------------------+---------------------------+
Deeply nested tables
17_deeply_nested_tables.html
three levels of nested tables. Recursion of the table strategy; indentation/width budget shrinks at each level.
L1
| L1-right |
<body>
<table>
<tr>
<td>
L1
<table>
<tr>
<td>
L2
<table>
<tr>
<td>L3a</td>
<td>L3b</td>
</tr>
</table>
</td>
<td>L2-right</td>
</tr>
</table>
</td>
<td>L1-right</td>
</tr>
</table>
</body>
+------------------------------+----------+ | L1 | L1-right | | | | | +---------------+----------+ | | | | L2 | L2-right | | | | | | | | | | | +-----+-----+ | | | | | | | L3a | L3b | | | | | | | +-----+-----+ | | | | | +---------------+----------+ | | +------------------------------+----------+
Caption thead tbody tfoot
18_caption_thead_tbody_tfoot.html
<caption>, <thead>, <tbody>, <tfoot>. Section grouping the flattener may ignore; caption placement and header/footer distinction.
| Quarter | Revenue |
|---|---|
| Q1 | $1.2M |
| Q2 | $1.5M |
| Total | $2.7M |
<body>
<table>
<caption>Quarterly Results</caption>
<thead>
<tr>
<th>Quarter</th>
<th>Revenue</th>
</tr>
</thead>
<tbody>
<tr>
<td>Q1</td>
<td>$1.2M</td>
</tr>
<tr>
<td>Q2</td>
<td>$1.5M</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td>$2.7M</td>
</tr>
</tfoot>
</table>
</body>
Quarterly Results +---------+---------+ | Quarter | Revenue | +=========+=========+ | Q1 | $1.2M | +---------+---------+ | Q2 | $1.5M | +---------+---------+ | Total | $2.7M | +---------+---------+
Kitchen sink cell
19_kitchen_sink_cell.html
one cell containing a heading, paragraph, link, list, bold price, and <pre> — everything at once, next to simple cells.
| Product | Everything |
|---|---|
| Mega Widget | HighlightsA great product with many features:
Price: $19.99. See details below. SKU: MW-1000 |
<body>
<table>
<tr>
<th>Product</th>
<th>Everything</th>
</tr>
<tr>
<td><b>Mega</b> Widget</td>
<td>
<h4>Highlights</h4>
<p>A <a href="https://example.com/">great</a> product with <em>many</em> features:</p>
<ul>
<li>Fast</li>
<li>Cheap</li>
<li>Reliable</li>
</ul>
<p>Price: <b>$19.99</b>. See details below.</p>
<pre>SKU: MW-1000</pre>
</td>
</tr>
</table>
</body>
+-------------+----------------------------------------+ | Product | Everything | +=============+========================================+ | Mega Widget | HIGHLIGHTS | | | | | | A great[1] product with many features: | | | | | | * Fast | | | * Cheap | | | * Reliable | | | | | | Price: $19.99. See details below. | | | | | | SKU: MW-1000 | +-------------+----------------------------------------+ References: [1] https://example.com/
Realworld invoice
20_realworld_invoice.html
invoice with long description cells, numeric columns, and colspan subtotal/total rows. The realistic "this must look right" case.
Invoice #10432
| Description | Hours | Rate | Amount |
|---|---|---|---|
| Consulting: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i | 12.5 | $150 | $1,875.00 |
| Development work including code review, testing, and deployment to production. | 40 | $125 | $5,000.00 |
| Misc | 2 | $100 | $200.00 |
| Subtotal | $7,075.00 | ||
| Tax (8%) | $566.00 | ||
| Total Due | $7,641.00 | ||
Thank you for your business.
<body>
<h1>Invoice #10432</h1>
<table>
<tr>
<th>Description</th>
<th>Hours</th>
<th>Rate</th>
<th>Amount</th>
</tr>
<tr>
<td>Consulting: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i</td>
<td>12.5</td>
<td>$150</td>
<td>$1,875.00</td>
</tr>
<tr>
<td>Development work including code review, testing, and deployment to production.</td>
<td>40</td>
<td>$125</td>
<td>$5,000.00</td>
</tr>
<tr>
<td>Misc</td>
<td>2</td>
<td>$100</td>
<td>$200.00</td>
</tr>
<tr>
<td colspan="3">Subtotal</td>
<td>$7,075.00</td>
</tr>
<tr>
<td colspan="3">Tax (8%)</td>
<td>$566.00</td>
</tr>
<tr>
<td colspan="3"><b>Total Due</b></td>
<td><b>$7,641.00</b></td>
</tr>
</table>
<p>Thank you for your business.</p>
</body>
Invoice #10432 +---------------------------------------------------+-------+------+-----------+ | Description | Hours | Rate | Amount | +===================================================+=======+======+===========+ | Consulting: Lorem ipsum dolor sit amet, | 12.5 | $150 | $1,875.00 | | consectetur adipiscing elit, sed do eiusmod | | | | | tempor i | | | | +---------------------------------------------------+-------+------+-----------+ | Development work including code review, testing, | 40 | $125 | $5,000.00 | | and deployment to production. | | | | +---------------------------------------------------+-------+------+-----------+ | Misc | 2 | $100 | $200.00 | +------------------------------------------------------------------+-----------+ | Subtotal | $7,075.00 | +------------------------------------------------------------------+-----------+ | Tax (8%) | $566.00 | +------------------------------------------------------------------+-----------+ | Total Due | $7,641.00 | +------------------------------------------------------------------+-----------+ Thank you for your business.
Email layout two column
21_email_layout_two_column.html
a layout table (logo cell + content cell) as used in HTML email. Here the table is *not* tabular data — collapsing to columns is wrong; linear flow is likely better. Tests whether layout tables should be detected/treated differently.
![]() | NewsletterLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
<body>
<table width="600">
<tr>
<td width="150"><img src="logo.png" alt="LOGO"></td>
<td>
<h2>Newsletter</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p><a href="https://example.com/read">Read more</a></p>
</td>
</tr>
</table>
</body>
+--+---------------------------------------------------------------------------+ | | NEWSLETTER | | | | | | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | | | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim | | | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea | | | commodo consequat. | | | | | | Read more[1] | +--+---------------------------------------------------------------------------+ References: [1] https://example.com/read
Cells with delimiter chars
22_cells_with_delimiter_chars.html
cell text already contains |, tab, and comma characters. Whatever column delimiter is chosen collides with cell content; tests escaping/robustness.
| Expression | Meaning |
|---|---|
| a | b | a OR b (note the pipe already in the text) |
| x y | tab-separated already |
| 1,299.00 | comma as thousands separator |
<body>
<table>
<tr>
<th>Expression</th>
<th>Meaning</th>
</tr>
<tr>
<td>a | b</td>
<td>a OR b (note the pipe already in the text)</td>
</tr>
<tr>
<td>x y</td>
<td>tab-separated already</td>
</tr>
<tr>
<td>1,299.00</td>
<td>comma as thousands separator</td>
</tr>
</table>
</body>
+------------+--------------------------------------------+ | Expression | Meaning | +============+============================================+ | a | b | a OR b (note the pipe already in the text) | +------------+--------------------------------------------+ | x y | tab-separated already | +------------+--------------------------------------------+ | 1,299.00 | comma as thousands separator | +------------+--------------------------------------------+
Uneven row heights
23_uneven_row_heights.html
one row whose three cells have 1, 4, and 2 lines (via <br>). Vertical alignment of a single row's cells.
| one line | line 1 line 2 line 3 line 4 | line 1 line 2 |
<body>
<table>
<tr>
<td>one line</td>
<td>line 1<br>line 2<br>line 3<br>line 4</td>
<td>line 1<br>line 2</td>
</tr>
</table>
</body>
+----------+--------+--------+ | one line | line 1 | line 1 | | | line 2 | line 2 | | | line 3 | | | | line 4 | | +----------+--------+--------+
Cells with entities
24_cells_with_entities.html
©, , </>, €, —, é inside cells. Entity width vs. byte width interacts with column measurement.
| Term | Symbol |
|---|---|
| Copyright | © 2026 |
| Less/Greater | < and > |
| Price | €9,99 — café |
<body>
<table>
<tr>
<th>Term</th>
<th>Symbol</th>
</tr>
<tr>
<td>Copyright</td>
<td>© 2026</td>
</tr>
<tr>
<td>Less/Greater</td>
<td>< and ></td>
</tr>
<tr>
<td>Price</td>
<td>€9,99 — café</td>
</tr>
</table>
</body>
+--------------+--------------+ | Term | Symbol | +==============+==============+ | Copyright | © 2026 | +--------------+--------------+ | Less/Greater | < and > | +--------------+--------------+ | Price | €9,99 — café | +--------------+--------------+
Cell long token
25_cell_long_token.html
a 128-char unbroken hash token in a cell (no spaces to wrap on). Forces a hard mid-token chop within a column width.
| Field | Value |
|---|---|
| Hash | a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4 |
| Short | ok |
<body>
<table>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
<tr>
<td>Hash</td>
<td>a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4</td>
</tr>
<tr>
<td>Short</td>
<td>ok</td>
</tr>
</table>
</body>
+-------+----------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +=======+==================================================================================================================================+ | Hash | a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4 | +-------+----------------------------------------------------------------------------------------------------------------------------------+ | Short | ok | +-------+----------------------------------------------------------------------------------------------------------------------------------+


