HTML, CSS, JavaScript
VS HTML5 Attribute Warnings
Gravatar is a globally recognized avatar based on your email address. VS HTML5 Attribute Warnings
  Craig Tucker
  All
  Feb 14, 2017 @ 09:48am

Anyone know how to eliminate HTML5 attribute warnings in VS 2015 (update 3) such as a textbox placeholder?



Thanks much, Craig

Gravatar is a globally recognized avatar based on your email address. re: VS HTML5 Attribute Warnings
  Harvey Mushman
  Craig Tucker
  Feb 14, 2017 @ 10:48am

one thing I have noticed, if the document you are working on does not have a reconized filetype extention, VS highlights a lot of elements and attributes it does not know about.

So my question to you, is the file extention "html" or a script map? If it is a script map like wcsx, you can register it by going to menu Tools > Options > Text Editor > File Extentions and then specifing yours and selecting "Web Forms Editor".

There are other options of the type of editor you can select. If Web Form Editor does not work (it does for me) then maybe try one of hte others.

Gravatar is a globally recognized avatar based on your email address. re: VS HTML5 Attribute Warnings
  Craig Tucker
  Harvey Mushman
  Feb 14, 2017 @ 11:17am

Thanks for the input. Unfortunetly, I could not warnings to clear. It's a simple login page in .net aspx page with c# codebehind.

I also tried disabling validation with no luck too.

Gravatar is a globally recognized avatar based on your email address. re: VS HTML5 Attribute Warnings
  Rick Strahl
  Craig Tucker
  Feb 15, 2017 @ 12:58pm

Are you sure you're using an HTML 5 doctype on your document? If not it won't validate for HTML 5 and placeholder is only valid in HTML 5.

Make sure you have:

<!DOCTYPE html>
<html>

at the top. The DOCTYPE is critical.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: VS HTML5 Attribute Warnings
  Craig Tucker
  Rick Strahl
  Feb 15, 2017 @ 02:21pm

Yes, I have the <doctype specified as well.
Not a big deal just annoying, maybe it will be fixed in VS 2017 release next month...

Gravatar is a globally recognized avatar based on your email address. re: VS HTML5 Attribute Warnings
  Rick Strahl
  Craig Tucker
  Feb 15, 2017 @ 04:12pm

Not sure why that would be.

Note no squigglies and no warnings. I don't see any squigglies for you either which seems to indicate that there are no errors.

+++ Rick ---

© 1996-2024