The problem is a web browser is exactly that use case. Their whole function is to remotely render a GUI.
We gripe about web design when people start to act more like it's local, but all the things a browser does are essentially "I need a remote GUI" and a lot of effort has gone into that.
They are not and the fact HTML/CSS is NOT designed to be "remote GUI" is precisely the problem web has.
It is document + styling format. It was not designed to do GUIs, It was roundpeg squareholed into being one, and only after throwing copious amount of JS on it it works okay while being okay on design side
it is annoying how poorly web browsers support the local or ssh tunneled application use case though. it would be nice if there was a way to get browsers to work more like X servers, presenting an unix socket that applications (either local or ssh-tunneled) could connect to. Or something along those lines.
the main difference between web UI and a terminal is that a terminal streams instructions. For HTML you usually need a whole program that compiles
Modern web is a terrible abuse of what was originally a document viewer. A web app is not even in the same league with a TUI when it comes to remote access. It needs to be designed specifically to stay as noiseless on the network as a TUI app is by default, and the browser is incredibly janky and bloated, which is not avoidable. Don't worry though, modern TUIs are headed towards the same direction, because people want more and more features in a legacy thing instead of designing one for the purpose.
A terminal with an HTML/CSS embedding mode would be interesting.
In the BBS days, there were some attempts to move beyond ANSI escape sequences, like RIPscrip: https://en.wikipedia.org/wiki/Remote_Imaging_Protocol
Once the web took off, all that stuff disappeared...