in reply to Re^3: For valid HTML
in thread For valid HTML

That's a matter of opinion

No opinion. It really is illegal HTML, and that working to not working is the range of behaviour.

Ok, I suppose saying having it work is the best behaviour is an opinion. But seriously? You'd say browsers throwing errors at the slash would be better? For whom??

I'm sure some people would rather see XHTML win out over HTML 5.

That makes no sense. They're orthogonal. HTML 5 has an XML serialization too.

Oh really? The front page of perlmonks renders just fine in my browser but it's not even close to a well-formed document

I was expecting a counter example after "Oh really?". You need to show that the page wouldn't be rendered fine if the strict DTD was specified to contradict me. Browsers expect a tag soup for HTML docs no matter what DTD (if any) is specified.

To clarify, I believe there are two ends of the spectrum: what works and what is correct.

Earlier you were disagreeing with my opinion that having bad HTML work anyway is the best behaviour. Now you agree with it. What are you trying to say?

Replies are listed 'Best First'.
Re^5: For valid HTML
by rowdog (Curate) on Apr 06, 2010 at 22:18 UTC
    HTML 5 has an XML serialization too.

    Thanks for the heads up. I was suffering from the illusion that XHTML and HTML5 were competing standards.

    Earlier you were disagreeing with my opinion that having bad HTML work anyway is the best behaviour. Now you agree with it. What are you trying to say?

    Writing this post I realized that I have conflicting opinions and that I may not have expressed my beliefs clearly.

    1. I believe that, in the real world, browsers should try to make broken HTML work anyhow.
    2. I believe that, in a "perfect web", all browsers should refuse to show broken documents which would force dog+world to comply with the standards.

    I guess I just got too many phone calls saying "it's broken on IE4 on mac" (of course it is) sigh. Not to mention the countless "best viewed with intentional broken for IE" pages. But hey, that's the price I've paid for using Linux on the desktop since 1995.

    PS: My original point to Lady Aleena was that the slash didn't matter for two reasons: 1) We live in the real world where broken HTML works and 2) The future standards are currently saying that the slash will become valid.

      PS: My original point to Lady Aleena was that the slash didn't matter for two reasons: 1) We live in the real world where broken HTML works and 2) The future standards are currently saying that the slash will become valid.

      Thanks for that bit of sanity (a term I found in a thesaurus under antonyms for "pedantry").

      The actual reason for the trailing slashes is a desire to transition the web site to emitting more modern and rigorous mark-up. The reason for the doctype is because declaring an XHTML doctype would mean that having not finished that transition would lead to failures in rendering. It is unfortunate that the "transitional" doctype doesn't actually allow for transitioning such things.

      I enjoyed the sentence "It's not supported by most mainstream browser[s], but it's a valid SGML construct, and the HTML DTD doesn't prohibit it (unfortunally)." I've never heard anybody even mention an actual case of a browser that interprets "<br /" as the start of one of these SGML constructs and considers "<br />" invalid and doesn't render it the same as a "<br>" (while knowing about modern doctypes).

      I certainly don't believe that the (reasonable) non-SGML behavior is restricted to only some subset of mainstream browsers. I believe it is true of all mainstream browsers and the large majority of fringe browsers. I'd love to hear a report of such a different browser that is actually currently being used for the purpose of surfing the web (not part of some test strategy).

      I've certainly used a lot of less-popular browsers at PerlMonks and never noticed a problem with such trailing slashes. Nor can I recall a single complaint about the site not rendering due to such.

      The fact that the site shows an icon indicating imperfect HTML in some browsers and thus provides an opportunity for pedants to practice restraining their pedantry is merely a side benefit.

      - tye        

        tye wins. Again. And I think he's being pretty generous in acknowledging another's contribution of sanity, when he's the one who brings the most sanity.

        Thanks for the clarification tye. I particularly enjoyed this sentence:

        The fact that the site shows an icon indicating imperfect HTML in some browsers and thus provides an opportunity for pedants to practice restraining their pedantry is merely a side benefit.

      rowdog and ikegami...I did not mean for this to become a thing. Have some cookies. :)

      Have a nice day!
      Lady Aleena