See the question and my original answer on StackOverflow

The Html Agility Pack has a special option available as a property on the HtmlDocument class, named OptionFixNestedTags for fixing this kind of HTML errors:

    static void Main(string[] args)
    {
        HtmlDocument doc = new HtmlDocument();
        doc.OptionFixNestedTags = true;
        doc.Load(YourFile);

        doc.Save(Console.Out);
    }

This will output:

<table border="0" align="center" width="100%">
<tr><td class="header">A
</td><td class="header">B
</td><td class="header"><b>C</b>
</td></tr>
</table>