Cleaning the HTML code

Cleaning the code in your page from unwanted tags that clutter it is an important addition to the editor. Content copied from other text processing applications usually contains specific mark-up code that is not needed and might affect the way content is displayed in browser.

In many cases, since more than likely most of the site content is still kept in Microsoft Word format and has to be put online, you need to clean it for optimum display in browser. The time you spend reformatting your documents in HTML will be visibly reduced by using the clean functions. the editor has even a special paste function for Word content, so that you get the most out of both editing tools:

 

the editor detects when you trying to paste content from Microsoft Word and it prompts you for automatic cleaning.

To make sure your HTML code is clean, use the Clean HTML content feature - access it from the Styles toolbar:

 

The three available options are:

  1. Clean Word Mark-up - this option removes any unnecessary tags added by Microsoft Word and present in the current selection (or in page, if no selection was made). These tags are present in your document after you paste a text written and formatted in Word, or when you edit a page saved as web page by Microsoft Word.

  2. Clean All Formatting Tags - this option removes all the tags that apply formatting on the editor content (or on the selection, if any).

  3. Clean Inline Styles - this option removes all the CSS styles from the page elements.

 

If you create content in another editor, or want to copy it from another application which does not add any unnecessary tags, the content will be correctly pasted in the editor window.

 

XHTML Standard Compliance

Becoming more and more of an industry standard, XHTML is the way to go. This is why the editor has full XHTML support - it is based on a combination of Tidy and Javascript to output pure XHTML code.

Tidy is a free utility that automatically fixes the HTML mistakes and cleans sloppy editing into nicely laid-out mark-up. It is included with Savvy.