我只是想知道在 html5 页面上放置表单的正确方法。我似乎找不到任何关于表格的信息。
我的页面是一个联系页面,其中包含带有标题和所有内容的文章元素(Wordpress 页面)。我正在向页面添加一个联系表单,它有一个标题。他们应该在 <section>
中吗?或 <div>
?
<div>
<h3>title</h3>
<form></form>
</div>
或
<section>
<header>
<h3>title</h3
</header>
<form></form>
</section>
最佳答案
HTML5 规范将其定义为 -
The section element represents a section of a document, typically with a title or heading.
因此,我建议将带标题的表单放在您指定格式的部分中。
关于html - 在 html5 中带有标题的表单的 div 或部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7083654/