Table cells collection
Table object
Definition and Usage
The cells collection returns all
Syntax
tableObject.cells
property
| property | Description | ||
|---|---|---|---|
| length | Returns the number of in the collection | or | Number of elements. |
Method
| Method | Description |
|---|---|
| [name_or_index] | An integer specifying the element retrieval position (starting from 0) |
| item(name_or_index) | Returns the element at the specified index in the collection |
| namedItem(name) | Returns the index of the element specified by name index in the collection |
Browser support





All major browsers support the cells collection
Example
Example
The following example uses cells to display the content of the first cell:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
Try it »
More examples
Pop up the content of the first row
Align the cell content in table rows
Vertical alignment of cell content in table rows
Align the content of an individual cell
Vertical alignment of cell content
Change the content of table cells
Table object