Rimantas Liubertas wrote in post #957137:
>>> ...or not.  Yes, of course it's fine to use new attributes that older
>>> browsers will ignore.  However, HTML 5 differs from HTML 4 not just in
>>> its repertoire of attributes and elements, but also *in its basic
>>> syntax* -- HTML 5 is no longer a subset of SGML as HTML ≤4 is.  That's
>>> he part that (potentially) breaks graceful degradation.
>
> It breaks absolutely nothing.

You cannot possibly know this with certainty, I think.  Since 
non-HTML5-aware browsers use SGML syntax in non-XHTML documents, HTML5 
self-closing tags shouldn't be interpreted as self-closing tags (and are 
invalid HTML4 due to the trailing >).  The fact that, in practice, most 
browsers are lenient in this respect doesn't mean that this behavior 
should be relied on.

> More than that, only because browsers
> don't give
> a damn about SGML rules all that XHTML nonsense was possible:

I think you've got it backwards.  Self-closing XML-tags only became 
necessary to support in browsers when XHTML was introduced.  Before 
that, no one would have thought to use them, and so SGML parsing could 
(and perhaps should) have been the order of the day.

> according to SGML <br /> should be rendered as if it was <br> &gt;
> (search for
> SGML SHORTTAG).

Right.  So the trailing > isn't valid HTML4, so you can't assume that 
you can use it (outside an XHTML context) in a pre-HTML5 browser.

>
>> Anyway, back to the "HTML4 rather than XHTML", which has little to do with
>> HTML5 anyway. IE6 perfectly supports XHTML and its <br /> tags (with all of
>> the usual IE6 quirks of course), so there is no reason to go to HTML4 if
>> that is your concern.
>
> IE6 (and any version of IE) does not support XHTML at all. Try to feed
> them
> proper XHTML (that's with the MIME type application/xhtml+xml) and see
> what
> happens.

I think this was finally fixed in IE7, IIRC.

> They just silently ignore all those slashes.

Right.

>
> HTML5 finally fixes this, and you can use a syntax you like for your
> HTML5
> documents. However, if you want XHTML5 you MUST server your document
> with application/xhtml+xml: and by doing so be aware of all the
> differences
> in behaviour this brings.

Yup.

>
>
> Regards,
> Rimantas

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to