Operation Manual
283
USING DREAMWEAVER
Working with page code
Last updated 3/28/2012
3 Select or deselect any of the following options:
Word Wrap Wraps the code so that you can view it without scrolling horizontally. This option doesn’t insert line
breaks; it just makes the code easier to view.
Line Numbers Displays line numbers along the side of the code.
Hidden Characters Displays special characters in place of white space. For example, a dot replaces each space, a double
chevron replaces each tab, and a paragraph marker replaces each line break.
Note: Soft line breaks that Dreamweaver uses for word wrapping are not displayed with a paragraph marker.
Highlight Invalid Code Causes Dreamweaver to highlight in yellow all HTML code that isn’t valid. When you select an
invalid tag, the Property inspector displays information on how to correct the error.
Syntax Coloring Enables or disables code coloring. For information on changing the coloring scheme, see “Set the
code colors” on page 285.
Auto Indent Makes your code indent automatically when you press Enter while writing code. The new line of code
indents to the same level as the previous line. For information on changing the indent spacing, see the Tab Size option
in
“Change the code format” on page 283.
More Help topics
“Viewing code” on page 281
“Coding toolbar overview” on page 11
“Set code hints preferences” on page 289
Change the code format
You can change the look of your code by specifying formatting preferences such as indentation, line length, and the
case of tag and attribute names.
All the Code Format options, except the Override Case Of option, are automatically applied only to new documents
or additions to documents that you subsequently create.
To reformat existing HTML documents, open the document, and select Commands > Apply Source Formatting.
1 Select Edit > Preferences.
2 Select Code Format from the Category list on the left.
3 Set any of the following options:
Indent Indicates whether code generated by Dreamweaver should be indented (according to the indentation rules
specified in these preferences) or not.
Note: Most of the indentation options in this dialog box apply only to code generated by Dreamweaver, not to code that
you type. To make each new line of code that you type indent to the same level as the previous line, select View
> Code
View Options Auto-Indent option. For more information, see
“Set the code appearance” on page 282.
With (Text box and pop-up menu) Specifies how many spaces or tabs Dreamweaver should use to indent code that it
generates. For example, if you type 3 in the box and select Tabs in the pop-up menu, then code generated by
Dreamweaver is indented using three tab characters for every level of indentation.
Tab Size Determines how many characters wide each tab character appears in Code view. For example, if Tab Size is
set to 4, then each tab is displayed in Code view as a four-character-wide blank space. If, additionally, Indent With is
set to 3 Tabs, then code generated by Dreamweaver is indented using three tab characters for every level of indentation,
which appears in Code view as a twelve-character-wide blank space.