Skip to content

Table with multiple colspans and rowspans #25

@pauldbentley

Description

@pauldbentley

Given the following HTML table:

<table border="1">
  <thead>
    <tr>
      <th colspan="2" rowspan="2">Header 1</th>
      <th colspan="2">Header 2</th>
      <th colspan="2" rowspan="2">Header 3</th>
    </tr>
    <tr>
      <th>Sub-header 2.1</th>
      <th>Sub-header 2.2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="2">Data 1.1</td>
      <td rowspan="2">Data 1.2</td>
      <td rowspan="2">Data 2.1</td>
      <td rowspan="2">Data 2.2</td>
      <td>Data 3.1.1</td>
      <td>Data 3.1.2</td>
    </tr>
    <tr>
      <td>Data 3.2.1</td>
      <td>Data 3.2.2</td>
    </tr>
  </tbody>
</table>

The HTML output renders as:

image

However the Word output is:

image

I have highlighted in red an empty cell which is added in the wrong location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions