I know that HTML5 supports custom data-*
attributes, and I know that VS2010 SP1 is supposed to have HTML5 support included.
However, when I installed VS2010 SP1, I'm still getting validation errors on elements with data-*
attributes.
For example, this:
<a id="Clicky" data-for="@Model.Id">Clicky</a>
Yields the following warning in VS2010:
Validation (XHTML 1.0 Transitional): Attribute 'data-for' is not a valid attribute of element 'a'.
While I understand that these are just warnings and can safely be ignored, I'm trying to keep my site as standards compliant as possible, and if my warnings list is spammed with these warnings, I won't be able to see the valid warnings through all the noise.
Am I doing something wrong, or must I live with seeing these warnings?
Thanks in advance.
There is a little dropdown that you need to change to use HTML5 or others (XHTML 5, XHTML 1.1, etc.)
Click View --> Toolbars --> HTML Source Editing.
There will be a dropdown. Then choose HTML5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With