What are valid attributes for the DIV element in HTML?

前端 未结 4 1192
悲哀的现实
悲哀的现实 2020-12-31 05:49

What are all the valid DIV attributes?

Based on this link, it appears only class, id, title. Is that correct? Mea

4条回答
  •  心在旅途
    2020-12-31 06:39

    With HTML5, besides using the global attributes which can be used on any element, you can also define your own attributes using the data- attributes.

    John Resig on data- attributes

    All you have to do is use the HTML5 doctype () and your page will be valid. This doctype works fine even in older browsers.

提交回复
热议问题