Use in the table element what you want to use. When you use the table element, you have the index of the column or row in the table in the DOM.