Returns a reference to the collection of elements contained by the object.

Note. The all extension is not supported (does not exist) in IE11 Mode.

The all collection includes one element object for each valid HTML tag. If a valid tag has a matching end tag, both tags are represented by the same element object.

The collection returned by the document's all collection always includes a reference to the html, head, and title objects regardless of whether the tags are present in the document. If the BODY tag is not present, but other HTML tags are, a body object is added to the all collection.

If the document contains invalid or unknown tags, the collection includes one element object for each. Unlike valid end tags, unknown end tags are represented by their own element objects. The order of the element objects is the HTML source order. Although the collection indicates the order of tags, it does not indicate hierarchy.

The name property only applies to some elements such as form elements. If the vIndex is set to a string matching the value of a name property in an element that the name property does not apply, then that element is not added to the collection.


[ collAll = ] object.all

[ oObject = ] object.all(vIndex [, iSubIndex])

Possible Values

collAll Array of elements contained by the object. 

oObject Reference to an individual item in the array of elements contained by the object.

vIndex Required. Integer or string that specifies the element or collection to retrieve. If this parameter is an integer, the method returns the element in the collection at the specified position, where the first element has value 0, the second has 1, and so on. If this parameter is a string and there is more than one element with the name or id property equal to the string, the method returns a collection of matching elements.

iSubIndex Optional. Position of an element to retrieve. This parameter is used when vIndex is a string. The method uses the string to construct a collection of all elements that have a name or id property equal to the string, and then retrieves from this collection the element at the position specified by iSubIndex.

Members Table

The following table lists the members exposed by the all object.





Sets or retrieves the number of objects in a collection.





Retrieves an object from various collections, including the all collection.


Retrieves an object or a collection from a specified collection.


Retrieves a collection of objects that have the specified HTML tag name.


Retrieves a collection of all objects to which a specified behavior is attached.