
140
Part I
Laying the Groundwork in Dreamweaver CS4
Indent control options
Indenting your code generally makes it more readable. Dreamweaver defaults to indenting most
HTML tags with two spaces, giving extra indentation grouping to tables and frames. All these
parameters can be altered through the Code Format category of the Preferences dialog box.
The first indent option enables indenting, and you can switch from spaces to tabs. To permit indent-
ing, make sure a checkmark is displayed in the Indent checkbox. If you prefer your code to be dis-
played flush left, turn off the Indent option altogether.
To use tabs instead of the default spaces, select Tabs from the drop-down list. If you anticipate trans-
ferring your code to a word-processing program for formatting and printing, you should use tabs;
otherwise, stay with the default spaces.
Dreamweaver formats both tables and frames as special indentation groups. Within each of these
structural elements, the related tags are indented (or nested) more than the initial two spaces. As
you can see in Listing 4-1, each table row (
<tr>) is indented within the table tag, and the table data
tags (
<td>) are nested within the table row.
LISTING 4-1
An Indented Code Sample
<table border=”1” width=”75%”>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
<td>Row 1, Column 3</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2 </td>
<td>Row ...