HTML | DOM TableData cellIndex Property Last Updated : 01 Nov, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The TableData cellIndex Property is used for returning the position of a cell in the cells collection of a table row. Syntax: It return the cellIndex Property. tabledataObject.cellIndex Return Value: It returns a numeric value which represents the position of the cell in the cells collection of the table row Example: html <!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid green; } </style> </head> <body> <h1> GeeksForGeeks </h1> <h2>HTML DOM TableData cellIndex Property</h2> <p> Click on the row to get the cell index of the TableData </p> <table> <tr> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td>Geeks</td> <td id = "GFG" onclick="myGeeks(this)">For</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">For</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> <td id = "GFG" onclick="myGeeks(this)">For</td> <td id = "GFG" onclick="myGeeks(this)">Geeks</td> </tr> </table> <p id = "sudo"></p> <script> function myGeeks(x) { alert("cell index is: " + x.cellIndex); } </script> </script> </body> </html> Output: Before Clicking On Table cell: After Clicking On Table cell: Supported Browsers: The browsers supported by DOM TableData cellIndex Property are listed below: Google Chrome Internet Explorer Firefox Apple Safari Opera Comment More infoAdvertise with us Next Article HTML | DOM TableData cellIndex Property M manaschhabra2 Follow Improve Article Tags : HTML HTML-DOM Similar Reads HTML DOM TableHeader cellIndex Property the TableHeader cellIndex Property in HTML DOM is used for returning the position of a cell in the cells collection of a table row. Syntax: It returns the cellIndex Property:tableheaderObject.cellIndex Return Value: It returns a numeric value that represents the position of the cell in the cells col 1 min read HTML DOM TableData align Property The HTML DOM TableData align property is used to set or return the horizontal alignment of the content within the table cell. It is not supported by HTML5. Syntax: It returns the align property.TableDataobject.alignIt sets the align property.TableDataObject.align = "left | right | center | justify | 2 min read HTML | DOM TableData colSpan Property The Dom TableData colSpan Property in HTML DOM is used to set or return the value of a colspan attribute. The colspan attribute is used to specify the number of columns a table should span. Syntax: It returns the colSpan property. tabledataObject.colSpanIt is used to set the colSpan property. tabled 2 min read HTML DOM Table cellPadding Property The HTML DOM Table cellPadding property is used to set or return the value of the cellpadding attribute of the <table> element . The cellPadding attribute is used to define the space between the cell content and cell wall. Syntax: It is used to return the table cellPadding property. TableObjec 2 min read HTML DOM Table cellSpacing Property The HTML DOM Table cellSpacing Property is used to set or return the value of the cellSpacing attribute of an <table> element. The cellSpacing attribute is used to define the spaces between the cells. Note: This property is no longer supported in HTML5. Syntax It returns the cellSpacing Proper 2 min read Like