Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Clean Up Web Pages > Clean Up Your Pages Automatically

Check Your Pages for valid code and functional internal links, using BBEdit’s helpful validation features.

Clean Up Your Pages Automatically

BBEdit has two tools for cleaning up HTML: Format and Tidy. Format is more about appearance, while Tidy uses third-party open-source code to turn HTML dreck into spic-and-span code. And, at the end of this topic, I discuss using the Format command to Clean Up CSS.

Format

The first step in cleaning up a Web page is to format the code in such a way that it’s easily readable or useful in some other way. BBEdit’s Format command adds tabs and extra lines to the non-text part of an HTML file to break up the code; it can also clean up inside HTML tags. It’s not an all-or-nothing deal, though, and you can choose among a number of formatting modes. By default, Format works on the entire document, but you can restrict its scope by selecting text first.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial