Formatting HTML Source - Is there a utility?

Discussion in 'HTML' started by just say NO to PDF, Jul 17, 2003.

  1. 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 ( )
     
    just say NO to PDF, Jul 17, 2003
    #1
    1. Advertising

  2. just say NO to PDF

    John Bokma Guest

    John Bokma, Jul 17, 2003
    #2
    1. Advertising

  3. just say NO to PDF

    Mike Novak Guest

    "just say NO to PDF" <stingray_67@no_spam.hotmail.com> wrote in message
    news:XKDRa.15$...
    > 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 ( )
    >
    >


    Try HTML-Kit

    http://www.chami.com/html-kit/
     
    Mike Novak, Jul 17, 2003
    #3
  4. On Thu, 17 Jul 2003 13:29:31 -0700, just say NO to PDF wrote:

    > 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...

    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://(nothing)
     
    Toby A Inkster, Jul 17, 2003
    #4
  5. just say NO to PDF

    Michel Guest

    try notepad.

    Nothing beats notepad when it comes to web-design....

    Michel

    "just say NO to PDF" <stingray_67@no_spam.hotmail.com> wrote in message
    news:XKDRa.15$...
    > 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 ( )
    >
    >
     
    Michel, Jul 17, 2003
    #5
  6. just say NO to PDF

    kchayka Guest

    John Bokma wrote:

    > Toby A Inkster wrote:
    >
    >> On Fri, 18 Jul 2003 00:32:36 +0200, Michel wrote:
    >>
    >>>Nothing beats notepad when it comes to web-design....

    >>
    >> Yeah, it does:
    >>
    >> http://www.nedit.org/

    >
    > Texpad (http://www.textpad.com/ ) is cool too.


    Nah, Crimson Editor is better than textpad any day. :)
    <URL:http://crimsoneditor.com/>

    --
    To email a reply, remove (dash)ns(dash). Mail sent to the ns
    address is automatically deleted and will not be read.
     
    kchayka, Jul 18, 2003
    #6
  7. just say NO to PDF

    Jim Royal Guest

    In article <bf7864$4q4$>, Michel
    <> wrote:

    > try notepad.
    >
    > Nothing beats notepad when it comes to web-design....


    BBEdit.

    'Nuff said.

    --
    Jim Royal
    "Understanding is a three-edged sword"
    http://JimRoyal.com
     
    Jim Royal, Jul 18, 2003
    #7
  8. just say NO to PDF

    John Guest

    In article <>,
    says...
    > Toby A Inkster wrote:
    >
    > > On Fri, 18 Jul 2003 00:32:36 +0200, Michel wrote:
    > >
    > >
    > >>Nothing beats notepad when it comes to web-design....

    > >
    > >
    > > Yeah, it does:
    > >
    > > http://www.nedit.org/
    > >

    >
    > 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!
     
    John, Jul 18, 2003
    #8
  9. Arve Bersvendsen, Jul 18, 2003
    #9
  10. On Thu, 17 Jul 2003 13:29:31 -0700, just say NO to PDF
    <stingray_67@no_spam.hotmail.com> wrote:

    > 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.

    --
    Lars
     
    Lars G. Svensson, Jul 18, 2003
    #10
  11. just say NO to PDF

    Brian Guest

    kchayka wrote:
    >>Texpad (http://www.textpad.com/ ) is cool too.


    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?

    --
    Brian
    follow the directions in my address to email me
     
    Brian, Jul 18, 2003
    #11
  12. In article <180720030026212115%>, wrote:

    > 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

    --
    <http://web0.greatbasin.net/~leo/>
     
    Leonard Blaisdell, Jul 18, 2003
    #12
  13. In article <>, Leonard Blaisdell
    wrote:

    > What would it do that BBEdit can't?


    I don't know. But I bet emacs can do that.

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
    tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.
     
    Lauri Raittila, Jul 18, 2003
    #13
  14. just say NO to PDF

    Michel Guest

    Exactly my point

    And you're the only one yet to see it.

    Regards,

    Michel
     
    Michel, Jul 18, 2003
    #14
  15. just say NO to PDF

    rf Guest

    "Michel" <> wrote in message
    news:bf8jsg$vtj$...
    > Exactly my point


    What exactly is your point? I don't see the post to which you are replying
    to so you particular post is, to me, meaningless.
     
    rf, Jul 18, 2003
    #15
  16. just say NO to PDF

    Ben M Guest

    > In article <>,
    > says...
    >> Toby A Inkster wrote:
    >>
    >>> On Fri, 18 Jul 2003 00:32:36 +0200, Michel wrote:
    >>>
    >>>
    >>>> Nothing beats notepad when it comes to web-design....
    >>>
    >>>
    >>> Yeah, it does:
    >>>
    >>> http://www.nedit.org/
    >>>

    >>
    >> 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?


    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.

    --
    BenM
    http://www.benmeadowcroft.com/
     
    Ben M, Jul 18, 2003
    #16
  17. In article <bf8jsg$vtj$>, Michel wrote:
    > 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.


    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
    tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.
     
    Lauri Raittila, Jul 18, 2003
    #17
  18. just say NO to PDF

    Darin McGrew Guest

    Lauri Raittila <> wrote:
    > I don't know. But I bet emacs can do that.


    But vi can do it better! (Sorry, I couldn't resist... :)
    --
    Darin McGrew, , http://www.rahul.net/mcgrew/
    Web Design Group, , http://www.HTMLHelp.com/

    "A ship in harbor is safe, but that is not what ships are built for."
     
    Darin McGrew, Jul 18, 2003
    #18
  19. just say NO to PDF

    John Bokma Guest

    Arve Bersvendsen wrote:

    > John Bokma wrote in news::
    >
    >
    >>http://www.w3.org/People/Raggett/tidy/

    >
    >
    > 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

    --
    email: mail(at)johnbokma.com (or reply) home: http://johnbokma.com/
    UI design tips: http://johnbokma.com/websitedesign/ ~ ICQ 218175426
     
    John Bokma, Jul 19, 2003
    #19
  20. just say NO to PDF

    John Bokma Guest

    John Bokma, Jul 19, 2003
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Melinda
    Replies:
    2
    Views:
    303
    =?Utf-8?B?RGF2aWQ=?=
    Feb 7, 2005
  2. balma
    Replies:
    1
    Views:
    397
    Marco Schmidt
    Jul 13, 2003
  3. balma
    Replies:
    0
    Views:
    300
    balma
    Jul 13, 2003
  4. Cloud Burst
    Replies:
    11
    Views:
    1,126
  5. Mark Lookabaugh

    XML Formatting/Sorting Utility

    Mark Lookabaugh, Jul 17, 2003, in forum: XML
    Replies:
    1
    Views:
    3,425
    Chris Lovett
    Jul 17, 2003
Loading...

Share This Page