HTML5 Support In Visual Studio 2010
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!
Excellent info, but you might want to indicate that your VS2010 is installed on the D: drive, and most people would have it on the C:. Hopefully, most developers could figure that out, but I’ve met some that couldn’t.
Thanks!
I don’t know why MS and VS team is always behind!!!
This was very helpful!!!
Thanks
[...] HTML5 Support In Visual Studio 2010 – Raihan Iqbal looks at the support for HTML5 in Visual Studio, showing how you can get IDE support and validation by moving an XSD for HTML5 into the correct location in your VS install. [...]
Hi Raihan
Nice post. I’ve had to much the same thing. My main problem is that the HTMLTextWriter doesn’t contain HTML5 tags yet.
If anyone has created HTMLTextWriter that includes HTML5 tags I’d be eager to try it, so that I can get rid of redundant ‘s!
Cheers
Sniffer
That should say div’s in the last sentence, but your commenting system has stripped out the HTML tag!
[...] 1. HTML5 Support In Visual Studio 2010 [...]
couldn’t have done without you!
You saved me at least 2 hours of rooting around. Thanks. Cheers!
[...] Por defecto Visual Studio 2010 no incorpora una validación para HTML5, hasta el momento la única solución para esto que me ha funcionado la encontré en el Blog de Raihan Iqbal. [...]
[...] via raihaniqbal.net [...]
Thanks, Great fix and article.. Really useful
Awesome! This worked great for me (running VS 2010 on Windows 7 64-bit.) Thanks!
[...] Por defecto Visual Studio 2010 no incorpora una validación para HTML5, hasta el momento la única solución para esto que me ha funcionado la encontré en el Blog de Raihan Iqbal. [...]
You Rock! Thanks Men!
Brilliant stuff! Thanks for this. It was exactly what I was looking for. Thanks and keep up the good work.
Thank you it’s great post.
Hey thanks! That helped a lot!
[...] http://www.raihaniqbal.net/blog/2010/08/html5-support-in-visual-studio-2010/ [...]
Good post! Will the intellisence be working for javascript APIs also?
HTML5 is not finished, so BETA releases maybe have this included
Either way, thanks, great work!
Thanks for posting – I was looking for this archive.
HTML5-validation is not yet without errors, however. For example, it keeps complaining that I write a -tag without the type=”text/javascript” attribute (wich is not required, as per W3C).
However, a step in the right direction.
Apparently the SCRIPT-tag itself is filtered out of the previous comment. Understandable
Thanks, your article helped
thanx bru.. it work like a charm… LEGEND
Hey niceone!…its work perfect! thankx!
same thing happen with CSS3 so i changed its location.
* * * * * 5/5
How do i know which one is the *.reg file? How did u run it?
There is one flaw in this XSD as it still marks type in script tags as a required attribute.
To fix this, open up the XSD file in your IDE and go to line 581.
Look for:
This is part of the:
Remove the use=”required” and save. Restart Visual Studio if you have it open.
The HTML 5 default type for script elements is Javascript.
Look for: [ xsd:attribute name=type vs:readonly=true use=required]
This is part of: [ xsd:element name=script ]
Hi, thank you so much for providing this nice article. I don’t know why Microsoft always sucks in the web. It ‘s always behind others.
Anyway, I also started a new series on CSS3. A good article is CSS Multi-Column Module. Have a look at it buddy.
Thanks
Great post !!!
Thanks for the support.
Thank you very much Raihan Iqbal
thanks you so much for raihan iqbal
would not have been possible with out you
Nice post.
Saved me a lot of time.
Good post! However I found that my version VS2010 already had html5.xsd loaded. I only needed to change the text editor portion to use HTML5. But without your post I wouldn’t have known how to know that VS2010 was ready for html5! Thanks!
Does anybody about HTML5 tags in the HtmlTextWriter or have an alternative solution for this?