Reformatting Bad HTML

Posted on by Tim Rosenblatt

Let's say you're doing a salvage project where you have to recover someone else's awful code. Sometimes, you'll see poorly-formatted HTML, because the generating code behind it was built in a way that makes sense when you read the generating code, but not when you read the output.

Everyone loves HTML Tidy, because it helps out with reformatting HTML. Still, it's a command line tool. That's why Jonathan Hedley built this web interface to a Tidy script on his server. Which is handy, but you still have to go find his site and paste in the URL.

Here's something to save you time and sanity, built this morning by the Cloudspace team. A bookmarklet for showing Tidy'd HTML that takes the page you're on, and runs it through Jonathan's Tidy script. Drag it into your bookmarks, then click it when you're on a page that needs to be reformatted.

Nice!

 
comments powered by Disqus