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

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        

Replies are listed 'Best First'.
Re^7: For valid HTML (pedantry)
by jdporter (Paladin) on Apr 09, 2010 at 13:33 UTC

    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.

Re^7: For valid HTML (pedantry)
by rowdog (Curate) on Apr 08, 2010 at 19:03 UTC

    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.