Appendix B: Roundtrip HTML
Fig. 2 Here's a close-up of the HTML Corrections dialog box. The tags that were fixed were either redundant, unclosed, or were improperly overlapped.
Fig. 3 I edited my page in NoteTab and saved my changes. When I returned to the open page in Dreamweaver, this dialog box appeared asking me if I wished to load the saved page. Fig. 4 With Code Rewriting preferences turned off, as is the default, Dreamweaver will mark up some of your errors with these yellow tags in the Document window, in Design view. Here, I've turned all the rewriting on.
Fig. 5 In Chapter 4 and Appendix D, you can find out how to change Dreamweaver's Code Rewriting preferences.
| Dreamweaver contains many features that help ensure two things: that code is clean, and that you get to choose what changes, if any, Dreamweaver is permitted to make to errors that it finds on your pages. Roundtrip HTML, as these features are called, retains the format of HTML coded outside of the Dreamweaver environment. You can, however, choose to have Dreamweaver check for and correct common, sloppy errors (Figures 1 and 2). Some other WYSIWYG editors make their own corrections to HTML code, but the changes that Dreamweaver makes are always minimal and essential. You can also choose to have Dreamweaver make no changes at all. You can use Dreamweaver to edit Web documents that have been hand-coded in a text editor, that have been created in another HTML editor, or that have been generated by a database. You can also use Dreamweaver in conjunction with an external editor, so that you can simultaneously work on the code in one environment while using Dreamweaver for automated tasks and Dynamic HTML. In Dreamweaver MX and MX 2004, as described in Chapter 4, you must actually turn on Dreamweaver's automatic code-correcting features in order for Dreamweaver to make routine corrections to pages created or edited using other software. You can turn on these automatic cleanup features in the Code Rewriting panel of Dreamweaver's Preferences dialog box (Figure 4). See p. 147-8 in the Dreamweaver MX 2004 Visual QuickStart Guide, or p. 145 in the MX edition. If you don't modify your Preferences, Dreamweaver will not change your code even if it's totally lousy. Instead, you'll see yellow notations in the Document window Design view letting you know you flubbed up (Figure 5). Roundtrip HTML Features:
|