Skip to content
Sign upLog in
← Back to Community

Custom HTML Tags?

Profile icon

So, I've been experimenting with my HTML. I made a tag, added some CSS for it, and it treated it as a valid tag. But HTML isn't XML; there's a set of predefined tags already. So how come this is working? Is it as simple as writing a tag and some CSS?
Image could not be displayed

Answered by SixBeeps [earned 5 cycles]
View Answer
Profile icon

There are predefined tags that ere supposed to represent something special, but anything else goes. When the CSS gets parsed, all it has to do is look through and find matching tags that fit its filters. Though, making your own tags is very much not recommended, as you could just use classes instead.

Profile icon

Yes, you can create styles for custom tags. It's there for compatibility for future elements. A better solution would to be use CSS classes or Web Components.

Profile icon

Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. เว็บ พนันบอล