logoalt Hacker News

HTML Can Do That

131 pointsby encyclopedismyesterday at 3:11 PM23 commentsview on HN

Comments

dematztoday at 3:28 PM

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.

show 2 replies
aitchnyutoday at 4:06 PM

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.

jamescuntoday at 3:19 PM

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.

show 1 reply
hakessontoday at 3:27 PM

Yeah, I'm a great fan of both HTML and CSS "can do that". I find more useful things on the CSS side like :has, keyframes and container queries. Why duplicate code when you have it for free :)

show 1 reply
hk__2today at 3:45 PM

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.

yoz-ytoday at 3:40 PM

I think it’s neat but at the same time I’m cautious about implementing an “almost feature” in what’s supposed to be a declarative language.

Now everybody needs to support it and nobody can really use it.

I’m talking about the features in work like media controls on dialog buttons.

jdlshoretoday at 3:16 PM

The “hidden until found” feature surprised me. What’s the use case for something like that?

show 3 replies
bingemakertoday at 3:39 PM

<img> also supports "srcset" which can make the image component responsive. Hope they add a placeholder to it which can account for loading state.

hyperhellotoday at 3:25 PM

I don’t understand why the group invented these new attributes and methods of action for dialogs that don’t seem relevant to anything else. Was there some silly patent to work around?

show 1 reply
totallygeekytoday at 12:23 AM

I've been tooling with site for years now and I'm always shocked at what can be done with raw HTML. These are some really neat examples, some work a bit funny when it comes to mouse vs. arrow key functionality though (in particular the dropdown/autocomplete), I'm wondering if that's an Edge specific issue or Chromium.

yurishimoyesterday at 11:40 PM

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.

show 3 replies
iamgopaltoday at 3:41 PM

[dead]