I have been wondering about usage of HTML
<input type="text" name="first" id="name">
<input type="text" name="second" id="surname">
form is a block-level element in HTML. Typically, block-level elements allow both block-level and inline children.
Both div and span are valid children of form.
This link would help you to understand better
but You can always use W3C Markup Validation Service to check your html.
Hope this would help. You can also read about Box Modle for more understanding on this subject.