← Back to context

Comment by reactordev

1 day ago

Ooooo… now we’re talking. Sloppy HTML that closes a tag out of order or just declared out of order? Or rendering bugs when bold is before italic? It’s why XHTML should have been standard. Just dump, error out, make the developer fix it.

But the problem here is that our nice programmer-brained mental model does not match the actual requirements of text.

Unless you know about tree structures, it doesn’t make sense to the average person why you would have to stop and then restart a span of formatting options just because an unrelated attribute changed.

And that’s why XHTML failed - HTML is human-writable.

  • That’s not what the H stands for though… but I get what you’re saying. Because they opened in order, closing in same defined order should be allowed and thus we have all that peeking code to check to see if the next tag is that so we don’t error out and now we no longer conform to XHTML. Because non-engineers are writing HTML. It’s like putting the tires on before the brakes, but brakes after, and expecting it to work.

    However because you can be both bold and italic, these should just be flags and that’s how they are now which is why b or i can be closed before b or i. I doubt they are just flags in the code of the browsers though because tags support styles and stuff.

    • The larger point is what the T stands for: Text.

      Tree structures just aren’t very user-friendly representations of text, and it’s supposed to be “hypertext” after all. :-)

  • IMO a healthy dose of elitism would have helped tools to remain simpler and more secure (i.e.: not need to deal with trying to parse wrong input)

    I get that non programmers were writing html before, but these days not even most programmers write it.