previousElementSibling

previousElementSibling returns the first preceding sibling that is an element; otherwise null.

Syntax

element = node.previousElementSibling

Examples

1

2

3

4

Internal

nextElementSibling

External

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu