I was trying to play around with HTML5 assuming that VS 2010 had shipped with HTML5 support but to my dismay it was not the case. Bummer! So I did a bit of homework and came up with an easy workaround. If you try googling for html5 visual studio 2010, the first link that you will see is HTML 5 Intellisense for Visual Studio 2010 and 2008. But unfortunately, the patch provided over there doesn’t seem to work. (DO I HAVE TO DO EVERYTHING!!)
So here’s how I got it to work.
- Download this archive and extract the contents to your desktop.
- Copy/Move html_5.xsd to D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html. The path may vary depending on where you installed VS 2010 or Visual Web Developer 2010.
- From the extracted contents, run the appropriate registry file. In my case, it was VS-2010-x64.reg
- Now fire up Visual Studio 2010 (or VWD) and navigate to Tools > Options > Text Editor HTML > Validation. On the right panel, select HTML 5 as the Target.
- Now restart VS 2010 and you should be able to code valid HTML5. Enjoy!