htmlcustom-tagcustom-element

What are the reasons NOT to use custom HTML tags?


Given current HTML5 specs that allows creating custom HTML elements (as long as their name contains a dash), and the fact that Web Components seem to be a feature that's here to stay, I'd like to know why is creating your own custom HTML elements frowned upon?

Note, that I'm not asking whether to use Web Components - which are still a moving target, and even with great polyfills like Polymer might not be ready for production yet. I'm asking about creating your own custom HTML tags and styling them, without attaching any JS APIs to them.


Solution

  • Short answer: I haven't heard any very compelling reasons to avoid them.

    However, here are some recurring arguments I've heard made: