Easy Tutorial
❮ Prop Video Played Prop Style Textdecoration ❯

HTML DOM length Property

Element Object

Example

Returns the number of child nodes of the body element:

Output result:


Definition and Usage

The length property returns the number of nodes in a node collection.

The child nodes collection of a node object is an instance of a NodeList object.


Browser Support

All major browsers support the length property.


Syntax

Technical Details

Return Value: Returns a number, which represents the number of nodes in the node list.
DOM Version Core Level 1 Nodelist Object
--- ---
❮ Prop Video Played Prop Style Textdecoration ❯