HTML Tidy

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

HTML Tidy

Post by alex.barylski »

I need an online HTML code beautifier.

I searched for something like a FireFox extension but only found validators. I don't care if the code isn't 100% valid so much as I do tags are closed and nested properly. Formatting of white space and tabbing owuld be nice too...

Anyone know of a online site which taks HTML and beautifies it?

I really don't want to use a downloaded application but will if nessecary.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Everah wrote:HTML Purifier
Haha...I didn't even think of that...

AC there are some keywords you might want to add to the web site to assist in driving up SEO rankings.

Edit: Just tried but it seems to strip the <html><head> tags??? Anyway around that?

Edit2 Not a big deal as I just copied the tags from the original into the validated source. Would be really awesome if:
a. The output/result HTML was:
1. Stored in a TEXTAREA for quick and easy copying
2. Actually beautified with spacing and formatting :)
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Hehe. He's got a whole page on why HTML Purifier is the best one.


And it doesn't tab code? Really?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

It retains tabs and formatting, but doesn't add them.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I don't really see that as being within its scope... it isn't mean to make your code "pretty" so much as valid & safe
Haha...I didn't even think of that...

AC there are some keywords you might want to add to the web site to assist in driving up SEO rankings.
Are you serious?? HTML Purifier has been ALL OVER this site for like a week. You have asked questions about what it is. You even posted a thread suggesting that we create a forum for it. Do you even read people's responses?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

While HTML Purifier's feature-set is converging with Dave Raggett's HTML Tidy, it still does not support the structural elements such as <html>, <body> or <head> that would be necessary for it to clean up an entire page.

You can download HTML Tidy, which is basically what you're looking for (it beautifies, validates, etc. It doesn't clean XSS, but that's probably not what you need). You can also use this web interface to HTML Tidy.
And it doesn't tab code? Really?
Nope, although it can use Tidy to indent code if you want it to.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Look for the "Html Validator" add-on for Firefox. It's currently at v0.8.3.9.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

The Ninja Space Goat wrote:I don't really see that as being within its scope... it isn't mean to make your code "pretty" so much as valid & safe
Haha...I didn't even think of that...

AC there are some keywords you might want to add to the web site to assist in driving up SEO rankings.
Are you serious?? HTML Purifier has been ALL OVER this site for like a week. You have asked questions about what it is. You even posted a thread suggesting that we create a forum for it. Do you even read people's responses?
I was serious and still am yup. :)
Post Reply