x
Loading
 Loading
Hello, Guest | Login | Register

Tidy Up With HTML Tidy

HTML Tidy cleans and pretty prints your HTML.

Web sites are rarely maintained by the same person over a long period of time. Much more often, web pages pass from developer to developer. And since the skill (and style) of developers can differ greatly, a site’s HTML can grow to be inconsistent, even ugly, sloppy, and non-compliant with standards.
If you inherit such dubious HTML, you may long for a tool to help clean up and validate the code. Luckily, such a tool exists: it’s called HTML Tidy and it’s available from http://tidy.sourceforge.net/. HTML Tidy can automatically fix a wide range of coding errors and can also tidy up sloppy editing into nice-looking markup (often called pretty printing). HTML Tidy can even make the (often extremely ugly) output from specialized HTML editors such as Frontpage readable by a human.
HTML Tidy was originally written by Dave Raggett and is licensed under the W3C license.
After downloading and unpacking the source tarball, run…
$ /bin/sh build/gnuauto/setup.sh
… from the top source directory. You can now use the normal ./configure&&make&&make install process to complete the installation, leaving you with the utility tidy.
In addition to fixing a wide range of coding problems, tidy can also highlight things that you need to work on manually. tidy lists each item with the line number and column, so you can easily see where the problem lies in your markup. To be safe, tidy won’t generate a cleaned up version when there…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace