element traversal properties

DOM properties such as children, firstElementChild and nextElementSibling that move between elements while skipping text and comment nodes.

In more detail

The older firstChild and nextSibling return any node, including the whitespace text between tags, which surprises many beginners. The element versions give you only elements.

Related terms

Taught in

References