I'm just wondering what are you thinking about DIV-tag inside FORM-tag?
I need something like this:
<form> <input type="text"/> <div> some </div> <div> another </div> <input type="text" /> </form>
Is it general practice to use DIV
inside FORM
or I need something different?
<form> is what you use to create a form for people to fill in. Div is used to divide sections of the web page up.
You can use multiple divs within a form, but you cannot close a parent before the child is closed.
The <div> tag can NOT be inside <p> tag, because the paragraph will be broken at the point, where the <div> tag is entered. To apply styles inside a paragraph use <span> tag, which is used with inline elements.
If you use a div in a td you will however get in a situation where it might be hard to predict how the elements will be sized. The default for a div is to determine its width from its parent, and the default for a table cell is to determine its size depending on the size of its content.
It is totally fine .
The form
will submit only its input type controls ( *also Textarea
, Select
, etc...).
You have nothing to worry about a div
within a form
.
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