Format, HTML/XML, Text Editor, Options Dialog Box
Makes it possible for you to set preferences for when and how automatic formatting will insert physical line breaks and apply case preferences in the HTML view markup editor. To access these settings in the Options dialog box, expand the Text Editor node, select HTML/XML, and choose Format.
To open the Options dialog box, select Options on the Tools menu. These settings supplement those available from HTML Designer Options pages.
Apply Automatic Formatting
To apply Automatic Formatting in the HTML view and XML editors, choose Advanced on the Edit menu and select Format Document. If you select both of the Apply Automatic Formatting options, your documents will be reformatted whenever you change from Design view and again whenever you save a document in Design view.
If you select only one of the options, then the specific Automatic Formatting preferences set on the Format, Tabs, HTML Specific, and XML Specific HTML/XML Options pages are applied upon the action indicated.
If neither option is selected, no formatting preferences are automatically applied.
Note When you are working on a large document, reformatting can be time-consuming; you might prefer to select only one of these options
- When saving document
When selected, directs Automatic Formatting to reformat your markup whenever you save your document in Design view. - When switching from Design to HTML/XML view
When selected, directs Automatic Formatting to reformat your markup whenever you change from Design view to HTML view.
Automatic Formatting Options
These options cause the HTML view and XML editors to add or remove physical line breaks during automatic formatting, and to add or not add quotes around attributes. The Apply Automatic Formatting settings determine when reformatting occurs.
Note These settings do not alter XML white space that is significant data.
- Apply line breaks
When selected, Automatic Formatting inserts physical line breaks before and after the markup for certain HTML elements, as if you had pressed Enter or Return in the HTML view editor. Line breaks can improve the readability of your markup. This setting does not cause the editor to insert or remove any line break (<br>) or paragraph (<p>) elements encoded in your markup. - Insert attribute value quotes
When selected, Automatic Formatting adds or retains quotation marks around attribute values (for example id="Select1"). Clear this option if you prefer to insert quotation marks into your markup manually.
Capitalization
When these options are selected, the HTML view and XML editors apply a default case format to the names of elements and attributes during automatic formatting. When this reformatting occurs is determined by the Apply Automatic Formatting settings.
Note Because XML is case-sensitive, setting a default case can impact XML parsers.
Tags
These options specify whether automatic formatting changes the names of HTML elements to uppercase or lowercase, or lets them remain as entered.Option Result As entered Element case remains exactly as entered. Uppercase Element names are reformatted to uppercase. Lowercase Element names are reformatted to lowercase. Attributes
These options specify whether automatic formatting will change the names of HTML attributes and properties to uppercase or lowercase, or let them remain as entered.Option Result As entered Attribute case remains exactly as entered. Uppercase Attribute names are reformatted to uppercase. Lowercase Attribute names are reformatted to lowercase.
See Also
HTML Designer | General, HTML/XML, Text Editor, Options Dialog Box | Tabs, HTML/XML, Text Editor, Options Dialog Box | HTML Specific, HTML/XML, Text Editor, Options Dialog Box | XML Specific, HTML/XML, Text Editor, Options Dialog Box | General, HTML Designer, Options Dialog Box | Display, HTML Designer, Options Dialog Box | Options that Affect Existing HTML, CSS, or XML Markup