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.