[TYPO3-content-rendering] BLE, core and HTML5

Patrick Broens patrick at patrickbroens.nl
Tue Aug 9 12:39:40 CEST 2011


On 9-8-11 11:37 , Georg Ringer wrote:
> Am 09.08.2011 11:33, schrieb Patrick Broens:
>> If that is necessary, why would you choose the html5 doctype? IMHO That
>> does not make sense. If you or your client want older browser support,
>> you should stick to XHTML or HTML4 doctypes. TYPO3 works perfectly with
>> these doctypes in older browsers.
> 
> yes I have that in mind. It seems I don't really get it.
> Doctype is the one thing but what will be the default css_styled_content
> be in 4.7? optimized for HTML5 and therefore I would need to choose
> css_styled_4-6?
> 
> Georg
Ok, I try to explain:

In TS you have the setting config.doctype, where you can make the output
in the frontend HTML4, XHTML 1.0 transitional and strict, XHTML 1.1 and
HTML5. This is a setting which has as default HTML4, but in every TYPO3
website it is probably set to XHTML.

TYPO3 currently does not really support HTML, and especially HTML4. Void
(single) tags are not allowed to be closed, like <br />. In HTML4, and
W3C advises this for HTML5 as well, this should be <br>, without the
ending slash.

The past weeks I've changed this behaviour in css_styled_content and in
some parts of the core, to make every doctype validated in the W3C
validator.

The same is for HTML5. There is obsolete stuff, like the already
mentioned summary and longdesc attribute, but also new tags, which we
can and want to use, considering proper output but also better
accessibility. To use this, we also have to switch to CSS 2.1. But IE7
does not support HTML5 and CSS2.1 fully. This means when you decide to
have a website in HTML5, you should warn the customer it will not
properly work in older browsers. If your customer wants to have it work
in older browsers, you should switch to XHTML.

There is however some light at the end of the tunnel ;-)
I just had a Skype meeting with some guys of the BLE team. You can use
Modernizr for older browsers. It's shipped with TYPO3 from version 4.5
and tries to have older browsers behave like modern browsers with HTML5.

I still have to try this. I did not work with Modernizr before, only did
some projects with fully blown HTML5 without any old browser support.

This would solve the whole problem. We can have proper HTML5 output. Yeah!!!

More on this later. First some testing to do.

Patrick


More information about the TYPO3-project-content-rendering mailing list