Hacker News new | ask | show | jobs
by recursivedoubts 1347 days ago
I would very much like for HTML to incorporate concepts from htmx (particularly more flexible transclusion) so that more dynamic websites and applications can be built entirely in HTML.

JavaScript became popular because HTML stopped moving forward as a hypermedia, focusing instead on client-side features that, while certainly nice, didn't increase the expressive power of the format in terms of hypermedia.

3 comments

I feel this way too. JavaScript is overused in part because HTML is very much lacking for the types of websites people expect and want to build today.

By sticking to a rather small selection of semantic and layout primitives with some form fields sprinkled on top, we’re forcing all the responsibility onto the individual developer. Which leads to poor performance, poor accessibility, incalculable man-hours wasted building the same things over and over.

Why isn’t there a <gallery> element that I can slot child items into and style with CSS? Or a <lightbox> element to view those items in a larger size? Or tabbed control groups? These things have existed since long before people could build rich apps on the web, and having them built into the user agent would give so much power back to the user in terms of customisation and accessibility.

It’s like HTML still lives in a world where the web is solely for documents.

Agree, but HTML itself doesn't have and doesn't need "transclusion" when HTML is understood to be an SGML vocabulary and SGML has all these things and more, from basic sharing of headers/footers and other markup fragments [1] to parametric macro expansion and event-based templating [2].

[1]: http://sgmljs.net/docs/producing-html-tutorial/producing-htm...

[2]: http://sgmljs.net/docs/templating.html

(Putting transclusion into quotes here because that term is from Ted Nelson and is possibly ill-defined in a HTML/SGML context)

> when HTML is understood to be an SGML vocabulary and SGML has all these things and more

HTML hasn’t been SGML for a long time, and it’s never going to go back. Understanding it to be an SGML vocabulary would be a serious error. In the context of HTML, what SGML supports is even more irrelevant than it was twenty years ago (and it was pretty thoroughly irrelevant even then).

MS had a great solution back in the day with their Dynamic HTML. The anti-MS community opted for what we have been left with instead of adopting what MS came up with. DHTML was pretty awesome.

https://archive.org/details/dynamichtmlrefer00redm

I'm not sure what you mean, because DHTML was really just an umbrella term for the then-new HTML+CSS+JS combo; the "dynamic" part came from the latter two.