- Introduction
- Understanding HTML
- Using the Reference Panel
- Using Code View
- Using Code Live View
- Setting Code View Options
- Entering HTML Code
- Using Code Hints
- Working with HTML Head Tags
- Inserting HTML Comments
- Using the Coding Toolbar
- Using Quick Tag Editor
- Using the Tag Inspector
- Using the Tag Chooser
- Opening Related Files
- Navigating to Related Code
- Setting Site Specific Code Hints
- Setting Code Hint Preferences
- Setting Code Format Preferences
- Setting Code Rewriting Preferences
- Setting Code Color Preferences
Setting Code Rewriting Preferences
You can use the Code Rewriting section of the Preferences dialog box to specify how and if Dreamweaver changes your code. Some of the rewriting options allow you to fix invalid nesting and unclosed tags; prevent duplicate names for form objects; ensure attributes values and URLs contain legal characters; and add the right JavaScript tags upon opening active content files. These options have no effect when you edit your code in Code view. If you disable the rewriting options, invalid HTML code that would have been rewritten is displayed in the Document window.
Set Code Rewriting Preferences
- Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.
- Click the Code Rewriting category.
- Select from the following options:
-
Fix Invalidly Nested and Unclosed Tags. Select to rewrite overlapping or transposed tags and inserts closing quotation marks and to insert closing brackets as needed.
-
Rename Form Items When Pasting. Select to prevent duplicate names for form objects.
-
Remove Extra Closing Tags. Select to delete closing tags that don’t have an associated opening tag.
-
Warn When Fixing Or Removing Tags. Select to display a summary of invalid HTML code Dreamweaver wants to fix.
-
Never Rewrite Code: In Files With Extensions. Select to prevent code rewriting in files with specific file extensions, and then specify the files extensions you want separated by a space.
-
Encode <, >, &, And “ In Attribute Values Using &. Select to make sure attribute values you enter outside Code view contain legal characters.
-
Do Not Encode Special Characters. Select to prevent Dreamweaver from changing URLs to use only legal characters.
-
Encode Special Characters In URLs Using &#. Select to make sure URLs you enter outside Code view contain legal characters (use the &# encoding method).
-
Encode Special Characters In URLs Using %. Select to make sure URLs you enter outside Code view contain legal characters (use the % encoding method).
-
- Click OK.