Formatting HTML Source - Is there a utility?

J

just say NO to PDF

Here's the scoop:

Does anyone remember the UNIX utility "pretty" for formatting C code?

What I'm looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags

Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello,
World" of about 50KB...

Recognising that the two requirements are somewhat contradictory, I may need
two utilities...are there any free ones available before I do it myself in
PERL?

--Maarten ( (e-mail address removed) )
 
M

Mike Novak

just say NO to PDF said:
Here's the scoop:

Does anyone remember the UNIX utility "pretty" for formatting C code?

What I'm looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags

Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello,
World" of about 50KB...

Recognising that the two requirements are somewhat contradictory, I may need
two utilities...are there any free ones available before I do it myself in
PERL?

--Maarten ( (e-mail address removed) )

Try HTML-Kit

http://www.chami.com/html-kit/
 
T

Toby A Inkster

What I'm looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation, line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags

Tidy does both of these. Someone has already posted a link to the old Tidy
site, but the newest versions can be found at http://tidy.sourceforge.net/
Reason: Have you ever seen what kind of a mess you get when you paste WORD
(or other rich text) into a HTML editor like Front Page? Answer is a "Hello,
World" of about 50KB...

Tidy has special routines for dealing with the output of FrontPage, Word,
etc...
 
J

John

Nirvana rocks :)

Texpad (http://www.textpad.com/ ) is cool too. I like the clip library
and the tabbed interface.

John

There are also dandy macros you can add to TextPad, and when you add Tidy
to the Tools menu, what more could you want?

(another) John
_______________________________________________
C'est la vie! C'est la guerre! Say no more!
 
L

Lars G. Svensson

What I'm looking for is a utility that will do two things:
1) Format the HTML code itself to make it more readable (indentation,
line
breaks, etc.)
2) Optimize HTML to remove empty and redundant tags
JEdit <http://www.jedit.org> with XML/HTML and JTidy plugins. Requires
Java, though.
 
B

Brian

That's a new one for me.
Nah, Crimson Editor is better than textpad any day. :)
<URL:http://crimsoneditor.com/>

I tried that. The context highlighting, with different colors, was
great. But I couldn't live w/out my clip libraries in NoteTab, so I
went back. Does Crimson have anything like that?
 
L

Leonard Blaisdell

BBEdit.

'Nuff said.

Amen old Mac buddy! I can't speak for any of the PC world programs, but I
can't imagine a better text editor. What would it do that BBEdit can't?

leo
 
B

Ben M

(e-mail address removed) says...

There are also dandy macros you can add to TextPad, and when you add
Tidy to the Tools menu, what more could you want?

Completely agree, textpad is my favourite text editor.
I use it for XHTML with all my clip libraries and added tools, it's great.

I often use macros to escape all the text etc, very nice.

Also really good for C# as well, so my ASP.Net development speeds along.
 
L

Lauri Raittila

Exactly my point

You said:
Nothing beats notepad when it comes to web-design....
And you're the only one yet to see it.

Well, who is familiar with notepad? It misses all things I am used in
text editors. I had to use Notepad for few hours one day not long back as
TheGun didn't work. It was useless. It don't understand unix line breaks,
for example. That alone makes it very bad for web design, where most
files do have unix file breaks.
 
J

John Bokma

Arve said:
John Bokma wrote in



Tidy now lives at <URL:http://tidy.sourceforge.net/>

Thanks! I noticed that when I followed the link mentioned there.
(And for prettyprinting of HTML, there's not much that beats tidy).

Haven't tried it yet. Since I handcode, I try to learn to pretty print
it myself :) But I am going to compare soon, maybe it can give me some
advise :).

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top