从规格:
The
section
element represents a generic section of a document or application. A section,in this context,is a thematic grouping of content,typically with a heading.Examples of sections would be chapters,the varIoUs tabbed pages in a tabbed dialog Box,or the numbered sections of a thesis. A Web site’s home page Could be split into sections for an introduction,news items,and contact information.
…
Note: The
section
element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting,authors are encouraged to use thediv
element instead. A general rule is that thesection
element is appropriate only if the element’s contents would be listed explicitly in the document’s outline.
(http://dev.w3.org/html5/spec-author-view/the-section-element.html#the-section-element)
The div element has no special meaning at all. It represents its children. It can be used with the
class
,lang
,andtitle
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 thediv
element instead of more appropriate elements leads to poor accessibility for readers and poor maintainability for authors.
(http://dev.w3.org/html5/spec-author-view/the-div-element.html#the-div-element)
本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:html5 – section和div之间有什么区别?
解决方法
从规格:
The
section
element represents a generic section of a document or application. A section,typically with a heading.Examples of sections would be chapters,and contact information.
…
Note: The
section
element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting,authors are encouraged to use thediv
element instead. A general rule is that thesection
element is appropriate only if the element’s contents would be listed explicitly in the document’s outline.
(http://dev.w3.org/html5/spec-author-view/the-section-element.html#the-section-element)
The div element has no special meaning at all. It represents its children. It can be used with the
class
,andtitle
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 thediv
element instead of more appropriate elements leads to poor accessibility for readers and poor maintainability for authors.
(http://dev.w3.org/html5/spec-author-view/the-div-element.html#the-div-element)
本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:html5 – section和div之间有什么区别?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。