|
|
|
|
|
by emseetech
657 days ago
|
|
It is perfectly reasonable and accepted html to use custom element names. Any element with a `-` is styled like a span by default. <article-content>
<author-byline><author-byline>
<content-text></content-text>
</article-content>
This has the benefit that you can describe your markup however you'd like if it doesn't fit into the standard elements, and if you find yourself in "div soup", often times this is mitigated through class names, but using custom elements, the closing tags are much more readable than </div>
</div>
</div>
|
|
And then you can register a javascript class with customElements.define to add more dynamic behavior, and the sky becomes the limit. Custom elements are like a hidden framework built right into the browser.