Is there such a program

Discussion in 'HTML & Website Design' started by oo7ml, Jul 12, 2007.

  1. #1
    Is there such a program that will organize your code

    Say my code is a complete mess like this

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>----- Template -----</title><link rel=stylesheet href=stylesheet.css type=text/css>
    </head>
    
    <body>
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr><!--top-->    <td class="top">&nbsp;
    </td> </tr>
      <tr><!--header-->
        <td class="header">&nbsp;
    	</td>
      </tr>
      <tr><!--main-->
        <td class="main">&nbsp;
    	</td>
      </tr>  <tr><!--bottom--><td class="bottom">&nbsp;
    	</td>
      </tr></table></body></html>
    HTML:

    Is there such a program that would organize it into something similar below


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="imagetoolbar" content="no">
    <title>----- Template -----</title>
    <link rel=stylesheet href=stylesheet.css type=text/css>
    </head>
    
    <body>
    
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
    
      <tr><!--top-->
        <td class="top">&nbsp;
    	
    	
    	
    	</td>
      </tr>
      
      
      <tr><!--header-->
        <td class="header">&nbsp;
    	
    	
    	
    	</td>
      </tr>
      
      
      <tr><!--main-->
        <td class="main">&nbsp;
    	
    	
    	
    	</td>
      </tr>
      
      
      <tr><!--bottom-->
        <td class="bottom">&nbsp;
    	
    	
    	
    	</td>
      </tr>
      
    </table>
    
    
    </body>
    </html>
    HTML:

     
    oo7ml, Jul 12, 2007 IP
  2. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #2
    Sounds like a pretty useful tool for me too. But unfortunately I don't know of one. I'd imagine it'd be somewhat difficult to build and have it work accurately.
     
    PHPGator, Jul 12, 2007 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Not really as all it would need to do is find the start and end tags and then sort it out from there

    If there is a table within a table it should recognize it and indent it further until the table is finished and so on for other tags...

    Lets build one...
     
    oo7ml, Jul 12, 2007 IP
  4. cianuro

    cianuro Peon

    Messages:
    1,857
    Likes Received:
    106
    Best Answers:
    0
    Trophy Points:
    0
    #4
    cianuro, Jul 12, 2007 IP
  5. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Can't seem to find the download for it
     
    oo7ml, Jul 12, 2007 IP
  6. kimberlybarryd

    kimberlybarryd Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Dreamweaver will convert it to css but Its going to have mistakes. Why not ditch the tables and go with CSS.
     
    kimberlybarryd, Jul 12, 2007 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    I've had good results with:

    http://infohound.net/tidy/

    Which is a online wrapped version of tidy. I recommend setting the wrap to 70 instead of 90, and making sure indent attributes is off, and wrap attributes is on.

    Though I'm with the crowds - single column table? No reason to EVER do that.... well, unless you are aiming for vertical positioning of content inside a fixed height container.
     
    deathshadow, Jul 12, 2007 IP
  8. Brent H

    Brent H Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I've always used the cleanup command in Dreamweaver. Not the best way, but it gets the job done for the most part.
     
    Brent H, Jul 12, 2007 IP
  9. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Learn to Hand code, alot easier.
     
    Marc Fraser, Jul 13, 2007 IP
  10. ninjamuk

    ninjamuk Peon

    Messages:
    305
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
  11. woocha

    woocha Peon

    Messages:
    107
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    find yourself a version of dreamweaver....your code might look like crap because you transfered it in the wrong mode. just open the file in dreamweaver and all will be right with the world
     
    woocha, Jul 14, 2007 IP