Live data from Hacker News

HTML Can Do That

chrisburnell.com

111–120 of 249 posts

Re: HTML Can Do That

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

Re: HTML Can Do That

#114

Earlier quoted context omitted.

You want client side table sorting? It's really easy to do this with server rendered HTML. Put a link with the sort param in the column headers and be done.

I want tables that can be sorted on multiple columns without triggering a page refresh on every click.

View Transitions are your friend

Re: HTML Can Do That

#115
post #110
post #108

Earlier quoted context omitted.

> HTML describes layout News to me.

That's understandable, because almost no one actually works with HTML directly anymore, but it's true. HTML contains tags like for headers, for paragraphs, for line breaks for prerendered text, and for ordered and unordered lists, for tables as well as , , , , , , , and to both explicitly and implicitly describe the layout of an HTML document. In fact, "HTML" itself is an acronym (HyperText Markup Language) in which…

HTML describes the structure of a document, not really the layout.

If HTML had or tags, sure. But CSS determines the layout via display/position properties.

Re: HTML Can Do That

#116
post #103
post #20

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.

This is… not obvious. It's only easy if you want the simplistic approach of sorting lexicographically or numerically. But in more complex tables, you will often encounter cases where the data representation for sorting is different from data representation for display. Of course most JavaScript-based tables get this wrong, too.

You could have a `sortkey` attribute, a bit like that has a `value` attribute in case the value you want is different from the value you display.

Re: HTML Can Do That

#117
post #50

Earlier quoted context omitted.

I used to do this in the early 2000s! Some folks back then would ask whether i was afraid that clicking a link (which loads a "new" web page) would slow things down and create an awful experience for users...but, my team and I would really focus on keeping web pages slim/lightweight to begin with...so it rarely was a problem. I don't think we were geniuses or anything like that, but keeping things light (always and f…

It still works exceptionally well in 2026 and generally creates better and faster experiences than an SPA with far, far less code.

You don’t need an SPA for that; Wikipedia has client-side sorted tables for example.

Re: HTML Can Do That

#118
post #26
post #20

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.

That's what javascript is supposed to be for. All of this is what javascript is supposed to be for. HTML describes layout, CSS describes style, JS adds interactivity. Want sortable tables? Get a jquery plugin and spend five minutes, done. This was all solved a decade or more ago.

> Want sortable tables? Get a jquery plugin and spend five minutes, done.

I want sortable tables without having to rely on a third-party plugin to a third-party library. HTML describes content, not just layout. It would be a `sortable` attribute on the table, just like you already have attributes that have nothing to do with layout such as `autocomplete` or `aria-*`.

Re: HTML Can Do That

#119

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…

Isn't this "drop-down menu on button click" easily doable using plain old HTML and CSS?

Here's a live example: https://www.w3schools.com/howto/howto_css_dropdown.asp

Post reply on HN