I'm using Visual Studio 2013 to create raw HTML pages (i.e. index.html).
In my HTML I am implementing custom HTML tags. As such, Visual Studio underlines my custom tags with squiggly lines (due to the warning of "Unknown element ...").
In hopes to get rid of the squigglies, I added my custom tags to the list of "Tag Specific Options" via Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options
. However, the squiggly lines persist.
Is there a way to inform VS2013 that my custom HTML tags are valid (i.e. keep VS2013 from underlining my custom tags with squigglies)?
Visual Studio 2013 Update 4 removes the validation in .html files, but not in .aspx files.
Support for custom elements, polymer-elements and attributes
We no longer validate unknown attributers for custom elements as there
will be many custom made tags in different frameworks. So there will
no longer be squiggles under the unknown elements.
— Announcing new Web Features in Visual Studio 2013 Update 4 RC
Download Visual Studio 2013 Update 4.
Validation is only removed in the HTML editor, not the HTML (Web Forms) editor. This means that, by default, .html files will not have custom element validation, but .aspx pages will. If, like me, you don't think this makes sense, show your support by voting for custom elements in .aspx files.
Hmm... what are you trying to accomplish? Keep in mind that if you could somehow make visual studio ignore the unknown element, that's no guarantee browsers looking at your page will be able to translate the element too.
Are your pages HTML5? if so you've got a shot at making it work. but you'll have to define it in client code. Here is source.
But most browsers don't support it yet! look at here elements.
In the case of making Visual Studio recognise the tags you could take this approach:
1) Go to: Tools > Options > Text Editor > HTML (Web Forms) > Formatting
2) Press "Tag Specific Options"
3) Select "Client HTML Tags" in the new window's treeview
4) Press "New Tag" below the treeview to add a new tag