Let's say I have this code
<form action="#" method="get">
<p>
<label for="name">Name:</label>
<input type="text" name="name" />
</p>
<p>
<input type="submit" />
</p>
</form>
Is it semanticaly fine to group elements with p? Because my teacher (again.. I know ..:P) told me that p should be used only for paragraph and that I should use div instead, but as I can see, p is used a lot and almost everywhere.
The last possibility I can think of is <br />
, which I think is the worst way.
So which one is the best to use
- wrap by
<div>
- wrap by
<p>
<br />
at the end