Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

addon to indent html



What do you guys/gals use to indent already existing html pages? Is there any third party app that can do this. Thanks,

John Cesta

john cesta
Tuesday, April 13, 2004

What do you mean by 'indent'?

Darren Collins
Tuesday, April 13, 2004

I suspect HTML Tidy is what is being looked for.

http://www.fogcreek.com/CityDesk/news/entries/2003/March/15.html

PNII

Perpetual Newbie II
Wednesday, April 14, 2004


Darren,

I mean to beautify.

<pre>
<FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>table</B></FONT> id<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"AutoNumber12"</FONT> <FONT COLOR=RED><B>style</B></FONT><FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"BORDER-COLLAPSE: collapse"</FONT> cellspacing<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"0"</FONT> cellpadding<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"0"</FONT> width<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"100%"</FONT> border<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"0"</FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
    </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>tbody</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
    </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>tr</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
            </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>td</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
              </font></span><FONT COLOR=GREEN><I>&lt;!-- START MAIN NAVIGATION --&gt;</I></FONT><span class=cch1><font color=gray>
            {$ .main_nav $}
     
              </font></span><FONT COLOR=GREEN><I>&lt;!-- END MAIN NAVIGATION --&gt;</I></FONT><span class=cch1><font color=gray>
            </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>td</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
      </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>tr</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
      </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>tr</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
          </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>td</B></FONT> valign<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"middle"</FONT> align<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"center"</FONT> width<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"100%"</FONT> bgcolor<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"{$ .nav_bar_color $}"</FONT> height<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"20"</FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
            </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=RED><B>span</B></FONT> class<FONT COLOR=BLUE SIZE=+1>=</FONT><FONT COLOR=PURPLE>"copyright"</FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>{$ .copyright $}</font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>span</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
          </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>td</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
      </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>tr</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
  </font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>tbody</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT><span class=cch1><font color=gray>
</font></span><FONT COLOR=BLUE SIZE=+1>&lt;</FONT><FONT COLOR=BLUE SIZE=+1>/</FONT><FONT COLOR=RED><B>table</B></FONT><FONT COLOR=BLUE SIZE=+1>&gt;</FONT></pre>

john cesta
Wednesday, April 14, 2004

ooops,

but not like that.

john cesta
Wednesday, April 14, 2004

That markup is horrible!

John Topley (www.johntopley.com)
Wednesday, April 14, 2004



It was a colorized bit of html.

john cesta
Wednesday, April 14, 2004

Ahh!

John Topley (Www.johntopley.com)
Wednesday, April 14, 2004

Ah, gotcha!

This one is supposed to be very good:
http://www.w3.org/People/Raggett/tidy/

It not only fixes up indenting, but adds missing closing tags, fixes up errors in tag nesting, adds quotes to attribute values, and more.

Darren Collins
Wednesday, April 14, 2004

*  Recent Topics

*  Fog Creek Home