开发者

I keep getting HTML5 syntax errors with MVC3

开发者 https://www.devze.com 2023-03-13 15:15 出处:网络
Are these kind of errors valid and how can I resolve. Doesn\'t HTML5 allow this code? <button title=\"\" disabled=\"disabled\" >&gt;开发者_C百科&gt;</button>

Are these kind of errors valid and how can I resolve. Doesn't HTML5 allow this code?

<button title="" disabled="disabled" >&gt;开发者_C百科&gt;</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.

0

精彩评论

暂无评论...
验证码 换一张
取 消