Re: Allow trailing slash in always-empty HTML5 elements?
Ian Hickson <
ian@...>
2006-12-01 03:22:28 GMT
On Tue, 28 Nov 2006, Sam Ruby wrote:
>
> In HTML5, there are a number of elements with a content model of empty: area,
> base, br, col, command, embed, hr, img, link, meta, and param.
>
> If HTML5 were changed so that these elements -- and these elements alone --
> permitted an optional trailing slash character, what percentage of the web
> would be parsed differently?
0%. Allowing or disallowing something is completely orthogonal to how it
is parsed.
> The basis for my question is the observation that the web browsers that
> I am familiar with apparently already operate in this fashion, this
> usage seems to have crept into quite a number of diverse places
Browsers don't do any sort of conformance reporting for HTML parsing, so
they can't actually be said to be allowing it or disallowing it. As far as
parsing goes, all browsers, as well as the HTML5 parsing specification,
handle bogus trailing / characters in tags by ignoring them.
> As a side benefit of this change, I believe that I could modify my weblog to
> be simultaneously both HTML5 and XHTML5 compliant
Since the namespace declaration is required in XML and disallowed in HTML,
this is not possible. In addition, while you may be right that a tiny
subset of XML might be equivalent to a tiny subset of HTML, it is not, and
will never be, generally true that you can take an arbitrary HTML5
document and treat it as XML. HTML5 has very detailed parsing rules (at
least as detailed as XML, and arguably more detailed, since the HTML
(Continue reading)