HTML5 support in CHTML

HTML5 become more and more popular, we need to support some features in CHTML.


CHtml::tag("div",array("class"=>"ico-small", "data-logid"=>"log-1890"))

The above code cannot generates the data-* attribute in div tag.

HTML5 tags such as header, footer, aside should be supported too. I think it is time for HTML5 in Yii 2.0

Fyi, there have been discussions and CHtml extensions to support HTML5 in Yii 1.1, but I’m not sure what the status is/will be for Yii 2 (XHTML4 vs. HTML5 ?)

Anyway, for your last idea, I believe header, footer, and aside tags are nothing but wrappers. I personally already use them in plain HTML (not generating them by Yii).

Some elements have already been added to the CActiveForm in the development version -