firstElementChild

The firstElementChild JS ParentNode returns the first child that is an element; otherwise null.

Syntax

element = node.firstElementChild

Examples

1 · element

2 · element

3 · innerHTML

4 · tagName

append

children

lastElementChild

prepend

querySelector

querySelectorAll

replaceChildren

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu