Search code examples
htmltabshtml-tablefocus

Is it possible to change tab/focus order in an HTML table so that it transfers vertically first and then horizontally?


Is it possible to change tab/focus order in an HTML table so that it transfers vertically first and then horizontally?


Solution

  • I suppose you have some kind of input elements in your table and on those you can set the tabindex attribute.

    <TABLE>
    <TR>
      <TD><INPUT NAME="Name" TABINDEX=1></TD>
      <TD><INPUT NAME="Age" TABINDEX=3></TD>
    </TR>
    <TR>
      <TD><INPUT NAME="Sex" TABINDEX=2></TD>
      <TD><INPUT NAME="Location" TABINDEX=4></TD>
    </TR>
    </TABLE>