O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code Format Preferences

The Preferences dialog box’s Code Format category sets the code formatting options for the HTML code visible in Code view (View Code View) and the Code Inspector. The preferences determine the formatting applied to new documents and additions to existing documents. Existing documents, including documents created outside Dreamweaver, can be reformatted by using the Commands Apply Source Formatting menu command. Beyond the options available in the Dreamweaver preferences, HTML source formatting is controlled by the SourceFormat.txt file in the Dreameaver4/Configuration folder as described in the next section.

The following preferences can be set in the Code Format preferences:

Indent

The Indent option turns on indentation for tags with the indent attribute in the SourceFormat.txt file.

Use

Select whether to indent code segments using Spaces or Tabs.

Table Rows and Columns

Indents <table>, <td>, <th>, and <td> tags.

Frames and Framesets

Indents <frame> and <frameset> tags.

Indent Size

Sets the number of spaces (if Use is set to Spaces) or tabs (if Use is set to Tabs) to indent text with the Text Indent command.

Tab Size

Sets the width of tab stops (defaults to four characters). Tab stops are used when pressing the Tab key or when indenting code automatically (if Use is set to Tabs).

Automatic Wrapping...After Column

If enabled, inserts a hard carriage return if a line of HTML code reaches the specified width.

Line Breaks

Specifies the line break format: CR LF (Windows), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required