Home > Articles > Graphics & Web Design > Dreamweaver & Flash

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

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

  • green-circle-1.jpg Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.
  • green-circle-2.jpg Click the Code Rewriting category.
  • green-circle-3.jpg 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).

  • green-circle-4.jpg Click OK.
  • + Share This
  • 🔖 Save To Your Account