DEV Community

Cover image for What HTML tag do you wish existed?
Nathan Kallman
Nathan Kallman

Posted on

What HTML tag do you wish existed?

Cover photo by Lennart Jönsson on Unsplash


What's a tag that would make your web designs so much easier to implement if only it existed? (or maybe it exists but just isn't supported well enough)

Top comments (8)

Collapse
 
vtrpldn profile image
Vitor Paladini

A <checkbox> or <radio>.

I know that there are input tags for that but they are so unnecessarily hard to style that I'd love some specifically built, easy to customize tags.

Collapse
 
kallmanation profile image
Nathan Kallman

They are unnecessarily hard to style! I basically just hide the whole input and use CSS to show my own thing; I wrote a pair of articles on how to do just that:


Collapse
 
vtrpldn profile image
Vitor Paladini

Great job! That styling hack actually forces you to learn a lot of CSS techniques so there might be a silver lining for checkbox and inputs being the way they are 😄

Collapse
 
kallmanation profile image
Nathan Kallman

For me, I wish there was some sort of details-group (either through name-ish attributes or an actual tag surrounding the group) that made the excellent <details> tag work like a radio group instead of checkboxes (i.e. opening one closes all others in the group).

This would make designing an accordion where only one element is open at a time so much easier.

I think it could also be used for a tab system. And maybe other things I'm not thinking of?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.