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 (10)

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?

Collapse
 
jfbrennan profile image
Jordan Brennan

Yeah! I was just thinking the same thing when working on an accordion (m-docs.org/accordion#open), but it's just so simple I settled w/o having it.

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

Let's Get Wacky


Use any Linode offering to create something unique or silly in the DEV x Linode Hackathon 2022 and win the Wacky Wildcard category

β†’ Join the Hackathon <-