How to specify the usage of an element using the tabbing order (tab keyboard button) in HTML?


Use the tabindex attribute in HTML to set the tabbing order of an element. It gives you the authority to change the order of your TAB usage on the keyboard.

You can try to run the following code to create tabbing order of an element in HTML −

Example

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <a href = "https://www.tutorialspoint.com/current_affairs/index.htm" tabindex="1">Current Affairs</a>
      <br>
      
      <a href = "https://www.tutorialspoint.com/codingground.htm" tabindex="2">Coding Ground</a>
      <br>
      
      <a href = "https://www.tutorialspoint.com/verbal_ability/index.htm" tabindex="4">Verbal Ability</a>
      <br>
      
      <a href = "https://www.tutorialspoint.com/quantitative_aptitude/index.htm" tabindex="3">Quantitative Aptitude</a>
      <br>
      
      <p>We have changed the tab order above. Use TAB on keyboard to view the changes.</p>
   </body>
</html>

Updated on: 30-Jul-2019

118 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements