beautypg.com

Set the code appearance, Change the code format – Adobe Dreamweaver CS3 User Manual

Page 316

background image

DREAMWEAVER CS3

User Guide

309

Set the code appearance

You can set word wrapping, display line numbers for the code, highlight invalid code, set syntax coloring for code
elements, set indenting, and show hidden characters from the View > Code View Options menu.

1

View a document in Code view or the Code inspector.

2

Do one of the following:

Select View > Code View Options

Click the View Options button

in the toolbar at the top of Code view or the Code inspector.

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 312.

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 309.

See also

“Viewing code” on page 307

“Coding toolbar overview” on page 20

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.

September 4, 2007