Freigeben über


Tip #24: Did you know…You could display CSS/HTML errors as warnings or as errors?

VS 2008 has this cool feature of downgrading any CSS/HTML errors to warnings. This is helpful when you want to separate out validation errors and are looking for what is actually stopping your build.

In VS 2008 the default behavior is to display any HTML/CSS errors as warnings as shown in the picture below. Note that warnings have a green squiggle.

Default

The settings for this feature is available under Tools –>Options –>Text Editor –>HTML->Validation as shown below.

ShowErrorsAsWarnings

If you still want your CSS/HTML errors to show up as errors you can uncheck the as warnings (HTML, CSS) check box. By doing this, VS will display it as errors as shown below. Note that error have a red squiggle as shown below.

As Errors

Reshmi Mangalore

SDET, Visual Web Developer

Comments