solsword

CS instructor and games researcher.

I'm a CS instructor at Wellesley College (Massachusett, Nipmuck, & Wampanoag lands) who does (technical) games research focused on PCG and operationalizable theories of player experience.


adrienne
@adrienne

seriously, i'm sure it's getting created by some terrible React framework or whatever, but it is incredibly bad and it needs to be fixed.


pnictogen-wing
@pnictogen-wing

it's always seemed really strange to me how HTML didn't (somehow) enforce better nesting of tags—first you have the confusion of some things needing paired open-close tags and other things not. and then you've got the fact that closing tags wander all over the place and it seems to be accepted that the browser ought to deal with them the best they can—why didn't HTML enforce stricter grammar? ~Chara


ireneista
@ireneista

ah! we have context on this, since we saw it happen

so the thing to understand about the web's rise to prominence is that it was driven by the feud between Netscape Navigator and Internet Explorer, each trying to hard to gain a monopoly through rapid addition of features. in the early days, lots of non-technical people were making websites, because the standards for what a site had to look like were a lot looser and the tools were a lot less complicated. (also: the higher standards and more complicated tools we have today have very little benefit to anyone except corporations. not no benefit - in particular, accessibility is slightly better now - but very little. but that's beside the point.)

so it turned out that when you turn millions of people loose on a thing, they don't manage to adhere to any clear syntax rules. there were all sorts of non-paired tags and bad nesting and stuff.

and remember, both of these browsers, though free in monetary terms, were driven by a profit motive - Netscape made enormous money by having a "Netscape Now" button which users would click and it would take them to the site of whoever had paid the most money that day; Microsoft simply wanted to tie the web into its network of monopolies in other markets.

so the browsers were highly incentivized to make that broken markup work somehow, so that their users could see all the sites they wanted to see, not just the sites that were written according to the spec, which had strict rules about nesting and stuff even back then.

so they made it work. they made it work by coming up with heuristics, and by constantly adding to those heuristics over time as site authors invented new forms of broken markup.

unfortunately this wound up making things worse for site authors who did want to take time to do things the right way, because those heuristics resulted in everything being a bit unpredictable even when you tried to follow all the rules. eventually the emerging community of web developers got a handle on what was going on, and documented what they called "quirks mode" as best they could for each other. yay them, but it still sucked that it was all constantly changing and that each browser did it differently, so you had to test your site everywhere.

so some people came up with a way to fix that, a new, rigorous standard that site authors could opt in to, that would always have clear tag nesting and closing and all that good stuff. the idea was that everyone who didn't know the right way to do things could keep doing what they'd been doing, and people who wanted reliability could use the new thing. this standard was XHTML.

we haven't asked anyone younger whether they've heard of XHTML. we suspect not? it did not fare well; it was too hard for browser developers to implement, and nobody could actually make use of it until browsers supported it. by this point there were quite a few more browsers, and the market was divided amongst them, so having stuff work in just one browser was no longer an option. our memory is failing us as to whether Netscape was still a going concern at this point, and whether Firefox had risen from its ashes yet, but in the big picture it doesn't matter. the point is that, to the extent anyone implemented XHTML, it was incomplete and buggy.

also, it turned out that even the paid professionals whose job was to do things the right way found it arduous to close tags correctly every time. the verbosity of the angle-bracket syntax compared to curly braces probably had something to do with that, in our personal view, but it's too late to change now and it doesn't matter anymore. besides, people feel affection for that syntax (we even feel it, a bit) and we don't want to take that away from them.

so anyway XHTML never got used much, and everything was terrible for a while. then! HTML5 came along. in HTML5 everyone said, well, okay we're going to do the quirky thing of trying to fix broken tags, but we're going to do it in a well documented way that's the same on every browser.

this worked! HTML5 succeeded at its mission. now everything is terrible in the same way everywhere. how thrilling!


You must log in to comment.

in reply to @pnictogen-wing's post:

there is XHTML which uses a much more consistent grammar and semantics (the semantics are not 1:1 and there are some things which are unique to XHTML and some things unique to HTML) but if you want a more consistent kind of HTML then XHTML is your best bet. It's also very modular which I like. It's kind of dead in that nobody has touched the standard in a long time really, but it is still considered a web standard and is part of pmuch every browser nowadays

I believe HTML does not enforce a stricter grammar because it was meant to be slapped together onto existing text documents by everyday folk and so the "laxness" of the parser helps with this goal, and it couldn't be made more strict as the web's use changed because that would break older websites. Hence why the push for a stricter syntax was made into a separate standard from HTML

in reply to @ireneista's post:

The span between Netscape and Firefox was me being the only person in the office to use — or to have heard of — Mozilla and Phoenix. Almost the only. The QA folks loved me.

But yeah. XHTML was better than HTML 3.2 / 4, but it kinda stopped there. I think maybe we were all waiting on decent implementations before trying to push anything with it. XML namespaces sort of worked but made even the most well-formed document a spiky mess to edit.

I think HTML 5 and JSON both rode in on that widespread "if I have to work out one more XPath somebody's gonna hurt and it's probably me" feeling.

yeah XML namespaces are quite well thought out, for what they do. what they do is kind of a thorny thing in the first place, but also necessary here. we have seen much worse approaches to modules in programming languages. (not that HTML is exactly a programming language, although web development is programming, but it's close enough for the purpose of this comparison.)

anyway, yeah.

Yeah, as a designer with a programming background from 1996-to-present, this was "fun" — not. Needing software that would render your site in every browser and send you a screenshot so you'd even have a CLUE what was going on was Not Fun™ (kinda expensive).

We went pro after making a website was a 5-6 digit thing too. So yeah that sucked too. Didn't make a bundle, then was getting undercut by everyone/everything.

I am very programmer oriented in nature and HTML and CSS have always been a weird sort of formatting tool. Like, okay, can understand the syntax, throw in CSS and then JavaScript and I am SO CONFUSED on how everything needs to work. As others mentioned, when to open and close tags is confusing as well. Throw in attributes that can just be labels that do nothing or instructions for browsers to follow and are difficult to figure out what you need, and modern ways to write a page always changing, and where do I store everything along with networking and.. I get anxiety just by thinking about the steps to make a raw web page.

I just wanted to make a blog or neat web app when I was young, why did making a website have to be so difficult T.T

yeah, that all makes sense for sure <3 we're really sorry the experience wound up being so bad - not that we had any say in stuff back then, but we feel responsible because we did agree with a lot of the individual decisions that got things to this point, when they happened

we're hopeful there's something better in the future. making stuff should be something everyone can do, and if it's not, there needs to be something simpler. even if it doesn't wind up looking as polished.

To be fair to you, it's just the nature of tech development that one makes mistakes or misjudgements to get things out the door without thinking about it on depth because these shiny color displays with rocks that think need justification to exist now rather than later or a competing standard or library or app would beat you to it.

For example, woulda been nice to have safer C types and better controlled standards, but that didn't happen due the want to get a popular high level language out. People are trying to fix it now with modern C++ and Rust and Zig.

well C when it was new was the best anyone knew how to do, and did incorporate a lot of sober reflection about similar languages, most of which have not had C's staying power. it was really a very thoughtful language. we recommend reading Dennis Ritchie's website about that history, it's deeply entwined with the history of Unix and was the foundation of a lot of stuff we have today.

https://www.bell-labs.com/usr/dmr/www/

but with that said, yeah we're huge Rust enthusiasts and we hear good things about Zig as well, and we're really glad that people are revisiting that. it's been, wow, sixty years... is that right? fifty? it's been a while. a lot of stuff has been invented since then and it's very good to move forward.

thank you for the kind words and we appreciate them <3

this was fun to read! i'm a young programmer, and all i know about XHTML is that it is an acronym that probably means something to do with HTML. I was raised on HTML5 from day 1

glad you liked it! yeah we've been trying to make an active effort lately to tell the stories about all the stuff we've seen, because we realized there are a lot of programmers younger than us who haven't, and knowledge is for sharing

HTML5 does encourage closing tags (including empty tags), and prescribes behavior for user-agents to auto-close adjacent unclosed tags. It'd be nice if it enforced that, because there is nothing wrong with XML, but that ship has sailed, unfortunately.

so this is basically one of the biggest practical examples of one of the worst habits of modern computing: the rush to monetize everything, immediately, meant that HTML and the web browser evolved into a horrifying mess and now there's nothing anyone can really do about it.

it's really difficult to like computers and computing when the chief engineering principle employed in pushing software products is "how quickly can we start making money off this?" with functionality in distant third place.

~Chara of Pnictogen