Last post Oct 13, 2011 05:35 PM by xinqiu
Oct 13, 2011 04:29 PM|levalencia|LINK
I created a simple mvc project in vs11 with asp.net mvc 3.
I forgot to check enable Enable Html 5 support.
According to this blog post from
Selecting this checkbox option does two things:
1) It causes VS 2010 to use HTML5 semantic markup elements like <header>, <footer>, <section> and <nav> within the default layout.cshtml file that is generated. This is instead of just using <div> elements for header/footer/navigation elements – which is
the default behavior if the HTML5 semantic checkbox isn’t selected (and the same behavior that we have shipped earlier).
works for older browsers).
However even though I didnt click on enable HTML 5 semantic support.
1. I can select HTML 5 in Doctype on the razor views.
2. I can see intellisense for <header> <footer>, etc.
3. modernizr-1.7.js is there in Visual Studio
Is this a bug? So whats the real difference?
Am I missing something here?
Another question: Can I enable HTML 5 semantic support if I didnt enable it when creating the project?
Oct 13, 2011 05:35 PM|xinqiu|LINK
If you compare the projects with “Enable Html 5 support” turned on or not, the difference lies in the _layout.cshtml, where the
following will be added when HTML5 semantic support is used
<meta charset="utf-8" />
The Dev11 editor will use HTML5 automatically based on the doctype you’ve
chosen or determine the semantic automatically if “Use Doctype” toolbar item is
selected. So the 2nd question’s answer is yes.