title: Tools for refactoring table-based HTML layouts to CSS?
body: <p>Given an HTML page that has a complex table-based layout and many tags that are duplicated and wasteful, e.g.:</p>
  
  <pre><code>td align="left" class="tableformat" width="65%" style="border-bottom:1px solid #ff9600; border-right:1px solid #ff9600; background-color:#FDD69E" nowrap etc.
  </code></pre>
  
  <p>Are there tools to aide the task of refactoring the page into a more compact form? For instance, a tool that automatically generates CSS styles and selectors? That converts tables into div layouts? </p>
  
  <p>Just to give a sense of the order of the problem, the page I'm looking at is >8000 lines of HTML and JavaScript, which is 500Kb <em>not counting</em> images!  </p>
  
  <hr>
  
  <p>Update: In re. "give up and start from scratch" comments. What does that mean, in the real world? Print out the page, scan it, set it as the background image in Dreamweaver, and start with that? Seriously? Would that really be more efficient than refactoring? </p>
  
  <hr>
  
  <p>Update: I'm not denigrating "trace it from scratch" nor did I mean to imply that Dreamweaver is by any means my tool of choice. I'm just very surprised that refactoring a layout is considered to be an intractable problem. </p>