Live data from Hacker News

HTML Can Do That

chrisburnell.com

101–110 of 249 posts

Re: HTML Can Do That

#101
I use most of these but the one that somehow slipped past me was the name attribute for details. That's going to be incredibly useful. I want to go rip out all of the js accordions now.

Re: HTML Can Do That

#102
post #57
post #8

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…

I mildly disagree. You still have to validate what the browser gives you. The user could have edited the "strong contract" using browser dev tools. So, let the user type, then validate in javascript if you want instant feedback (by changing colors, say, to red / orange), but ideally don't fully block it from being seen by the server. And do the real validation on the server side. This is what I found to be fairly rob…

GP was addressing the client-side UX, not backend validation, which is an orthogonal concern.

Re: HTML Can Do That

#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.

Re: HTML Can Do That

#104

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…

> 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.

I was going to suggest anchor positioning. I found it difficult to wrap my head around too, but once it clicks it's pretty simple. As a bonus, you can use it to position many other things than just popovers.

Re: HTML Can Do That

#105
post #5

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…

Does HTMX work with NoScript? Doesn't it require JS?

Re: HTML Can Do That

#108
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.

> HTML describes layout

News to me.

Re: HTML Can Do That

#109
post #5

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…

Does HTMX work with NoScript? Doesn't it require JS?

Nope, doesn't work. Doesn't stop you from making it a PWA, though.

Re: HTML Can Do That

#110
post #108
post #26

Earlier quoted context omitted.

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.

> 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 the "Markup" describes the function of HTML to "mark up" text in a similar way that editors once did in the print industry, describing which parts of the text should be bold, italicized, etc. or divided up and in what way.
Post reply on HN