Comment by reactordev

Comment by reactordev 2 days ago

9 replies

It’s totally valid XHTML, just not recognized.

XHTML allows you to use XML and <bold> <italic> are just XML nodes with no schema. The correct form has been and will always be <b> and <i>. Since the beginning.

yoz-y 2 days ago

The problem there is the order of tags not their names.

  • reactordev 2 days 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.

    • simonask a day ago

      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.

      • reactordev a day ago

        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.

        • simonask 13 hours ago

          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. :-)

      • yoz-y a day ago

        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.

maratc 2 days ago

I've edited my comment to better present the issue.

  • reactordev 2 days ago

    Out of order closure should definitely error out with an “unclosed italic tag detected at line:…” error.

    • maratc 2 days ago

      > It’s totally valid XHTML, just not recognized.

      Am I right in assuming that even you didn't notice the problem the first time you looked at it?

      > Out of order closure should definitely error out

      Hitchens's razor: "What can be asserted without evidence can also be dismissed without evidence."