HTML Can Do That: No JavaScript Needed

HTML Can Do That: No JavaScript Needed

HTML now handles dynamic features once reserved for JavaScript, from dialogs and popovers to grouped accordions and native input pickers. This page showcases modern HTML capabilities with browser support details and code examples, highlighting how declarative attributes replace scripting for common UI patterns.

HTML has been gobbling up swathes of what used to be JavaScript’s remit.
  1. dajonker

    Popover, dialog, invoker commands, our entire production app uses these everywhere and it works really well! The fact that dialogs and popovers are rendered on the "top layer" and that nested popovers are also automatically stacked on top of each other and have 'cascading close' shows how well these standards were designed.

    The only hard thing is still to position a popover near the element that triggers it, such as when you want to create a context menu that has to render above/below the button that triggered it. There is anchor positioning in CSS now but support is still limited and I find it hard to wrap my head around.

    LLMs are also terrible at these new standards. If they even know about them, they often think they're not baseline yet and they have almost zero training data compared to the giant mountain of weird JS and CSS that people had to use before the introduction of these standards.

  2. dematz

    This comment by yurishimo should not be [dead], imo

    >Just a heads up but datalist is not really a great solution if you need a strong contract. The user can still type whatever they want into the field and there is no fuzzy filtering or typo mitigation. Once you add those requirements, a library that gives you a more fully featured combobox is likely going to make a lot of sense in your project.

    It is true! HTML can do a lot of cool stuff, it might get you 100% of the way depending on what you're doing. But if you have a lot of forms where users pick from a value set, and want to enforce no other strings and get a good search experience, datalist does not get you there.

  3. jamescun

    I'm that minutia in your statistics that is still rocking NoScript in 2026, enabling JavaScript on a site-by-site basis, but this is increasingly difficult with the modern web.

    Hopefully these and others modern HTML features gain adoption, along with realizing perhaps a Single Page Application isn't necessary in most instances.

    I don't often have to write frontend code, but when I do, there is very little in terms of interactivity you cannot do with HTML these days, worst case a little sprinkle of something like HTMX.

  4. silvestrov

    I'd really wish I could force ISO format for the date input as the current "platform native" is confusing for some users when the OS use a different language than the web page that is shown.

    For some multi-country companies it makes sense to have all admin pages in English no matter the underlying OS language. Imagine sending a screenshot where the OS date format is different from what everybody else expects from an English page.

  5. hk__2

    Related to this, I’d love that HTML natively support sortable tables. This is a common need but every single time I have to reimplement it.

  6. aitchnyu

    Saw Grouped <details>, ctrl+F'd the hidden content and it opened and highlighted the text in Firefox. Was waiting for this fix ever since I learned about details.

  7. prinny_

    I eagerly await the day we can fully style the date & time component so that we can put all those JS libraries to (a well deserved) rest.

  8. Dwedit

    Grouped Details example really needs a hand cursor. An "I" cursor for selecting text doesn't tell you that an element is interactible.

More from this day

2026-08-20