Easy Tutorial
❮ Prop Style Animationiterationcount Prop Style Minheight ❯

HTML DOM length Property

Attributes Object

Example

Returns the number of attributes of a button element:

Output result:


Definition and Usage

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


Browser Support

All major browsers support the length property.

Note: Internet Explorer 8 and earlier versions return the total number of possible attributes for an element with the length property.


Syntax

Technical Details

Return Value: Number, representing the number of nodes.
DOM Version Core Level 1
--- ---
❮ Prop Style Animationiterationcount Prop Style Minheight ❯