<table> <tr> <td>[foo]</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>[foo]</td> <td>bar</td> <td>baz</td> </tr> </table> => <table> <tbody> <tr> <td>bar</td> <td>baz</td> </tr> <tr> <td>bar</td> <td>baz</td> </tr> </tbody> </table> <table> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>[bar</td> <td>baz]</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> </table> => <table> <tbody> <tr> <td>foo</td> </tr> <tr> <td>foo</td> </tr> <tr> <td>foo</td> </tr> </tbody> </table> <table> <thead> <tr> <th colspan="2" scope="col"> [Header1] </th> <th colspan="1" scope="col"> Header2 </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> </tbody> </table> => <table> <thead> <tr> <th colspan="1" scope="col"> Header2 </th> </tr> </thead> <tbody> <tr> <td>baz</td> </tr> <tr> <td>baz</td> </tr> <tr> <td>baz</td> </tr> </tbody> </table> <table> <thead> <tr> <th colspan="3" scope="col"> Header </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>[baz]</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> </tbody> </table> => <table> <thead> <tr> <th colspan="2" scope="col"> Header </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> </tr> <tr> <td>foo</td> <td>bar</td> </tr> <tr> <td>foo</td> <td>bar</td> </tr> </tbody> </table> <table> <thead> <tr> <th colspan="3" scope="col"> Header1 </th> <th colspan="3" scope="col"> Header2 </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>baz</td> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>[baz</td> <td>foo]</td> <td>bar</td> <td>baz</td> </tr> </tbody> </table> => <table> <thead> <tr> <th colspan="2" scope="col"> Header1 </th> <th colspan="2" scope="col"> Header2 </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>bar</td> <td>baz</td> </tr> </tbody> </table> <table> <thead> <tr> <th colspan="3" scope="col"> Header1 </th> <th colspan="3" scope="col"> Header2 </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>baz</td> <td>[foo</td> <td>bar</td> <td>baz]</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> <td>[foo</td> <td>bar</td> <td>baz]</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> <td>[foo</td> <td>bar</td> <td>baz]</td> </tr> </tbody> </table> => <table> <thead> <tr> <th colspan="3" scope="col"> Header1 </th> </tr> </thead> <tbody> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> </tbody> </table> <table> <tr> <td>[foo</td> <td>bar</td> <td>baz]</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> <tr> <td>foo</td> <td>bar</td> <td>baz</td> </tr> </table> =>