gpt4 book ai didi

外部容器的 HTML5 部分或 div

转载 作者:行者123 更新时间:2023-11-27 22:34:39 24 4
gpt4 key购买 nike

我需要一个容器来包含开放主体和结束主体标记之间的所有元素。我的问题是,这个容器应该是一个部分还是一个分区。我认为部分是最明智的决定,因为它是文档的通用部分,但希望得到其他人的意见。

最佳答案

"My question is, should this container be a section or a div."

简短回答:使用 <div> .

这是规范对此的描述:

"The section element is not a generic container element. When an element is needed only for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead."

如果您想阅读更多关于规范的信息,请访问以下链接:

http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element

关于外部容器的 HTML5 部分或 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14778139/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com