How do I change the order the elements on my page are given focus?

Question

When I tab through the elements on my site with the keyboard everything is almost perfect except for a couple case where it looks like the order is messed up. How can I change the order the elements on my page are given focus when I tag through everything?

Answer

Nearly all elements can be given focus, and have their focus order changed using the 'tabindex' attribute. Elements on a page will be given focus in the order of their tab index. W3 Schools has a great explanation of tabindex here.