I keep getting HTML5 syntax errors with MVC3
Are these kind of errors valid and how can I resolve. Doesn't HTML5 allow this code?
<button title="" disabled="disabled" >>开发者_C百科></button>
Validation: (HTML5) - the values permitted for this attribute do not include 'disabled'
Check Web Standards Update for Microsoft Visual Studio 2010 SP1 that improves html5/css3 validation and intellisense support.
I also had to change my Text-Editor preferences to get VS to recognize the HTML5 controls (for others that arrive here via Google like me).
In VS, go to Tools > Options and select TextEditor/HTML/Validation on the left pane, then select HTML5.
disabled
is a valid html5 property for button
. However, you should always specify type
on buttons, as different browsers use different defaults. Validation may be reporting that omission in a roundabout way.
精彩评论