Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines

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)?

like image 551
Jed Avatar asked Sep 08 '14 00:09

Jed


1 Answers

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.

like image 132
jordanbtucker Avatar answered Sep 27 '22 17:09

jordanbtucker