加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

什么是HTML中的DIV元素的有效属性?

发布时间:2020-12-14 19:33:05 所属栏目:资源 来源:网络整理
导读:什么是所有有效的DIV属性? 基于this link,它只显示类,id,标题.那是对的吗?含义,for属性和其他对DIV无效? 解决方法 见 W3C specs: id , class (document-wide identifiers) lang (language information), dir (text direction) title (element title) sty
什么是所有有效的DIV属性?

基于this link,它只显示类,id,标题.那是对的吗?含义,for属性和其他对DIV无效?

解决方法

见 W3C specs:
  • id,class (document-wide identifiers)
  • lang (language information),dir (text direction)
  • title (element title)
  • style (inline style information)
  • align (alignment)
  • onclick,ondblclick,onmousedown,onmouseup,onmouSEOver,onmousemove,onmouSEOut,onkeypress,onkeydown,onkeyup

for for label,并指定标签应用于的输入元素的id属性.

另见HTML5 specs:

The div element has no special meaning at all. It represents its children. It can be used with the class,lang,and title attributes to mark up semantics common to a group of consecutive elements.

Note: Authors are strongly encouraged to view the div element as an element of last resort,for when no other element is suitable. Use of more appropriate elements instead of the div element leads to better accessibility for readers and easier maintainability for authors.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读