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), ...
Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.