Editing HTML in Dreamweaver > Setting code formatting preferences

 

Setting code formatting preferences

You can set the following preferences for formatting code in Dreamweaver:

Code Colors preferences control how HTML tags (and the text between them) and scripts are color coded in the Code view or Code inspector. See Code Colors preferences.
Code Format preferences determine common code formatting options, such as line length and indentation. See Code Format preferences. These preferences provide a user interface for changing the SourceFormat.txt file.
Code Rewriting preferences determine what changes, if any, Dreamweaver makes to your code when you open an HTML or script document. See Code Rewriting preferences.
Fonts/Encoding preferences let you specify the font in which your code appears in the Code view (or Code inspector). See Fonts/Encoding preferences.

Finally, the SourceFormat.txt file (in the Dreamweaver/Configuration folder) provides precise specifications for formatting code. Editing this file in a text editor gives you the greatest degree of control over exactly how Dreamweaver writes code; you can change certain tag-specific options in this file that you can't change using the Code Format preferences. However, do not edit this file unless you are an advanced Dreamweaver user or developer, because you may cause serious errors to your Dreamweaver program. See Changing default HTML formatting.