Nested Tables with Floating TD tag

48 views
Skip to first unread message

LP

unread,
Jan 24, 2014, 12:20:40 PM1/24/14
to tagsoup...@googlegroups.com
I have a HTML doc with nested tables and a floating TD tag.
Tagsoup corrects this by choosing to close the previous table and continue.
An alternate correction is to start a new TR, which most browsers seem to render.

Is there a way to configure Tagsoup to the latter behavior?

<!-- Input HTML -->
<html>
<table border="1">
  <tr><td>Outer table 1</td></tr>
  <tr>
    <td>
       <table border="1">
         <tr>
           <td>
              Inner table 2
           </td>
         </tr>
         <td>  <!-- Problem right here with floating TD tag  -->
           Third row?
         </td>
       </table>
    </td>
</table>
</html>


<-- Tagsoup output: -->
<html>
<body><table border="1">
  <tr><td>Outer table 1</td></tr>
  <tr>
    <td>
       <table border="1">
         <tr>
           <td>
              Inner table 2
           </td>
         </tr>
         </table></td><td>  <!-- Problem right here with floating TD tag  -->
           Third row?
         </td>
       </tr></table>
</body></html>

Illustrated: http://jsfiddle.net/hPXL8/

zed

unread,
Mar 4, 2014, 2:55:17 PM3/4/14
to tagsoup...@googlegroups.com
I also have a similar problem, there seem to be different ways of fixing the HTML. Did you find a way to override or change the behavior of tag soup when it corrects HTML? 

Like you pointed out, when I pass it through tag soup my browser seems to 'correct' the HTML different to how tag soup does it.
Reply all
Reply to author
Forward
0 new messages