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        


In reply to Re^6: For valid HTML (pedantry) by tye
in thread For valid HTML by Lady_Aleena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.