ilyo
ilyo

Reputation: 36391

do DIVs inside form tags cause problems?

It seems sometime to work fine and sometimes not, so in should I use divs inside form or not? and in general is there a guide for what HTML tags will not work inside other tags?

Upvotes: 4

Views: 2838

Answers (1)

Quentin
Quentin

Reputation: 943240

Divs do not cause any intrinsic problems inside forms. Any CSS rules or JS that might get applied to them may cause problems, but the same is true of any element.

The HTML 4.01 specification includes a guide on how to read DTDs. This is applicable for HTML 3.2 and 4.x as well as XHTML 1.x. HTML 5 does not have an official DTD, so you have to pay attention to the "Content model" for each element in the spec.

Upvotes: 6

Related Questions