I've been looking for an exhaustive list, but can't find one anywhere. To avoid having to trawl through the specs, does anyone know what they are (and I suppose a complementary list of elements that can contain children would be useful too).
And how much does this list vary between XHTML 1 and HTML5?
Definition and UsageThe childNodes property returns a collection (list) of an elements's child nodes. The childNodes property returns a NodeList object. The childNodes property is read-only. childNodes[0] is the same as firstChild .
Explanation: An empty element is an element of HTML that do not have any child nodes.
Child nodes include elements, text and comments. Note: The NodeList being live means that its content is changed each time new children are added or removed. The items in the collection of nodes are objects, not strings. To get data from node objects, use their properties.
You can find a list of void elements (elements that cannot have any child content) in the HTML spec.
With the exception of the new elements introduced in HTML5, the list of void elements in XHTML is the same.
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