Tips for using Visual Studio-formatting in the HTML editor

Source: Internet
Author: User

When we manually write html in aspx, html confusion is often caused, such as too long lines and incorrect indent format.

At this time, we can select the html code to be formatted and right-click the Format Selection in the menu. Visual Studio will automatically complete the formatting for us.

The problem arises again. What kind of standards does Visual Studio use to determine the format? This standard can be defined.

Tools-> Options open the Options dialog box.

Choose Text Editor> HTML> Format.

You can define whether an Html Tag is capitalized and the maximum number of characters in each line.

If you want to, you can also use Tag Specific Options... Define different attributes for each label (for example, whether to fold the line after the label, color ). However, these definitions are too detailed. I personally think the default definition is quite good.

Besides the format settings, the HTML. Option dialog box also contains several other settings.

General: the setting statement is automatically completed, the line is automatically folded, And the row number is displayed.

Tabs: select the number of spaces generated by pressing the Tab key.

Miscellaneous: whether to automatically format the file during pasting and whether to automatically generate the Unique ID for the Element.

Validation: sets the target HTML standard type. For example, HTML 4.01 or XHTML1.1. Visual Studioj verifies HTML based on the selected Standard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.