I just want to know the correct way of putting a form on a page with html5. I can't seem to find anything regarding forms.
My page is a contact page with the content in an article element with heading and all (Wordpress pages). I'm adding a contact form to the page and it has a heading. Should they be in a <section>
or a <div>
?
<div>
<h3>title</h3>
<form></form>
</div>
or
<section>
<header>
<h3>title</h3
</header>
<form></form>
</section>
The HTML5 Spec defines it as -
The section element represents a section of a document, typically with a title or heading.
So, I would suggest the form with a heading to be placed in a section with the format you have specified.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With