Visual Studio 2010 and HTML5

Visual Studio 2010 was originally released without HTML5 support, but VS 2010 SP1 supports HTML5 to some extent. The entire HTML5 specification is not supported but most of the new elements and attributes are. That means you get both intellisense and validation for HTML5 with SP1.

How to turn it on?

After installing SP1 you have to tell Visual Studio to start using the HTML5 schema. Go to Tools -> Options, and then select Text Editor -> HTML -> Validation. You should now be able to select HTML5 or XHTML5 as the target schema or if you have the HTML Source Editing toolbar enabled, you can select it in the target schema dropdown.


In SP1 there are a few improvements in the CSS3 support as well, though not as elaborate as with HTML5. The editor now supports the more advanced selectors such as div:nth-child(2n+1) without giving validation errors and the new color values rgba, hsl, hsla and 8 digit hex values are also supported.
Therefore, with Visual Studio today, you can build HTML5 and CSS3 web applications on top of ASP.NET, and with SP1 Microsoft has made it a lot easier for you. All ASP.NET developers are encouraged to start taking advantage of what HTML5 and CSS3 has to offer already today. The Web Platform and Tools team takes web standards very seriously and everybody will see much better support for HTML5 and CSS3 in the future.

Copyright © All Rights Reserved - C# Learners