Share via


Formatting, HTML, Text Editor, Options Dialog Box

 

These settings allow you to set preferences for when and how automatic formatting inserts physical line breaks and applies case preferences in the Source view markup editor.

To access this dialog box

  1. In Microsoft Visual Web Developer, click Tools, and click Options.

    The Options dialog box opens.

  2. In the left panel, expand the Text Editor node, expand the HTML node, and click Formatting.

Note

Additional HTML options can be found under the HTML Designer node, which is visible if the Show all settings check box is selected.

For more information about formatting HTML, see NIB: Formatting Elements in the HTML Editor in Visual Web Developer.

Tasks

UI Elements

Capitalization

When these options are selected, the Source view and XML editors apply a default case format to the names of elements and attributes when the elements are first created and during automatic formatting. The time at which automatic reformatting occurs is determined by the Apply Automatic Formatting settings.

Warning

XML is case-sensitive. Setting a default case can impact XML parsers.

  • Server tag, Server attributes
    These options specify how the markup for Web server controls is capitalized:

    • As entered   Element case remains exactly as you enter it.

    • Uppercase   Element names are reformatted to uppercase.

    • Lowercase   Element names are reformatted to lowercase.

    • Assembly definition   Element case is determined by how the element is defined in the corresponding type class.

  • Client tag, Client attributes
    These options specify whether automatic formatting changes the names of HTML attributes and properties to uppercase or lowercase, or lets 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.

Automatic Formatting Options

These options cause the Source view editor to add or remove physical line breaks during automatic formatting, and determine whether quotes are added around attributes.

Note

These settings do not alter white space within XML markup.

  • Insert attribute value quotes when typing
    When this option is selected, the editor automatically puts quotation marks around attributes as you are typing (for example: id="Select1"). Clear this option if you prefer to insert quotation marks into your markup manually.

    Note

    Whether or not this option is selected, all existing quotation marks in your markup are retained; quotation marks are never removed.

  • Insert attribute value quotes when formatting
    When this option is selected, automatic formatting adds quotation marks around attribute values (for example: id="Select1").

    Note

    Whether or not this option is selected, all existing quotation marks in your markup are retained.

  • Auto insert close tag
    When this option is selected, the editor automatically creates a closing tag (for example, </b>) as soon as you close the opening tag.

Tag Wrapping

These options determine whether the editor breaks tags up into lines if they exceed a certain length.

  • Wrap tags when exceeding specified length
    When this check box is selected, the editor breaks tags across lines if the tag exceeds the length you specify in the Length text box. This occurs only when formatting the tag, not when you are typing a new tag.

    Note

    The value you specify is used as a minimum value. The editor does not break up individual attributes.

  • Length
    Specifies the number of characters to display in a line before wrapping. This input box is not enabled unless the Wrap tags when exceeding specified length box is checked.

  • Tag Specific Options
    Displays the Tag Specific Options dialog box, which allows you to set formatting options for individual tags or groups of tags.

See Also

General, HTML, Text Editor, Options Dialog Box
Tabs, HTML, Text Editor, Options Dialog Box
Miscellaneous, HTML, Text Editor, Options Dialog Box
Validation, HTML, Text Editor, Options Dialog Box
NIB: Display, HTML Designer, Options Dialog Box
General, HTML Designer, Options Dialog Box
NIB: Formatting Elements in the HTML Editor in Visual Web Developer