4 ms·
>why are we making brand new HTML elements for things[?] <div class="Foo">...</div> vs <x-foo>...</x-foo> Semantically, as far as machines are conce
by ahoge 13y ago
>why are we making brand new HTML elements for things[?]
<div class="Foo">...</div>
vs
<x-foo>...</x-foo>
Semantically, as far as machines are concerned, there is no difference between these two. For humans, however, the latter is way easier to read if there are some lines between the opening and the closing tag.
Custom elements also allow you to create your own shadow DOM, you can have your own "native" functions, and there is also some scoping for CSS.
- sitkack 13y agoMaybe use an html -> html translator? I agree. Modern html and css seem like one of the most confusing things I have ever tried to do, I find it analogous to doing taxes.