upvote
If you're not targetting mobile, why diverge from XHTML at all?
reply
Are there native frameworks which use XHTML? Regardless, a document language being used to construct complex, interactive GUIs is incidental complexity. XHTML can be a compilation target but it does not need to be a development target.
reply
But what's the benefit of using e.g. <row><cell> over <tr><td> if your only target is the web?
reply
If your only target is web then there is no benefit other than a reduction in complexity.

For example, a "row" is not just a "<div>" tag. Its a div which horizontally fills its container. Centering contents with a "center" style attribute abstracts flex-box, browser compatibility, version compatibility, and the cascading behavior of CSS.

You move the incidental complexity of the web platform into the compiler which will always do the right thing. And in exchange you get the option to compile to a native or mobile app for "free".

reply
I think I much prefer semantic elements like <section> over something like <row>. Calling something a row bakes in presentational information. Something that's a row on one screen size might be a column on another.
reply
I agree. For my blog I don't apply CSS and prefer to let the browser's reader mode perform the styling for me.

But there are categories of application where that is not acceptable. The presentation is a tightly controlled aspect of the application's functionality. If you're designing an application with leptos or sycamore my suspicion is you would fall into the latter category rather than the former.

reply
No browsers support streaming parsing of XHTML so you are slowing down pageloads. Especially for longer pages.

Also the ecosystem is really not there for XHTML, it never really took off. In practice it is close enough to HTML that it probably mostly works, but you are going to have problems.

The advantage is also very small, your emitter is simpler (you don't have to special case void elements and whatnot) and if you need to consume your own pages the parser is simpler. But that isn't worth much for most people.

It does make me sad, because parsing and even emitting HTML is a nightmare. But it won, so at the end of the day I find it easier to just accept that.

reply