How to correctly use “section” tag in HTML5?

前端 未结 6 1443
囚心锁ツ
囚心锁ツ 2020-12-02 04:59

I\'m trying to build a layout in HTML5 and after reading several different articles I\'m just confused. I\'m trying to get some input on how it should be used.

Below

6条回答
  •  -上瘾入骨i
    2020-12-02 05:25

    The correct method is #2. You used the section tag to define a section of your document. From the specs http://www.w3.org/TR/html5/sections.html:

    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 the div element instead

提交回复
热议问题