Last Updated: February 25, 2016
·
386
· mattcodez

Fieldset parents

Just figured out the hard way that a fieldset can't be the child of a paragraph (p) tag. Chrome at least will suck the fieldset element out of the p tag and make it a sibling.The Mozilla Developer Network docs imply this should work, stating any element that accepts flow content can be a parent of fieldset, of which p is on the list they link to. Use div instead.

Ex: http://jsfiddle.net/Jw765/

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset