Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Use of accesskey Attribute in Html

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 217
    Comment on it

    accesskey Attribute:

    Accesskey attribute is used in html forms and links. It provides the user to use keyboard keys  for functions which are usually done by a mouse. Example: Like user clicks on links in a webpage using mouse , so with the help of accesskey user can use keyboard shortcuts to click on links. It depends on the browser whether it supports accesskey attribute or not.

    There are different shortcut keys for different browsers and they are as follow:

     

    Browser Windows Linux
      Mac
    Internet Explorer [Alt] + accesskey N/A  
    Chrome [Alt] + accesskey [Alt] + accesskey [Control] [Alt] + accesskey
    Firefox
      [Alt] [Shift] + accesskey
    [Alt] [Shift] + accesskey [Control] [Alt] + accesskey
    Safari
      [Alt] + accesskey
    N/A
      [Control] [Alt] + accesskey
    Opera Opera 15 or newer: [Alt] + accesskey
    Opera 12.1 or older: [Shift] [Esc] + accesskey
       

     

    Example:

    <!DOCTYPE html>
    <html>
    <body>
        <nav>
            <ul>
                <li><a href="http://www.facebook.com" accesskey="f">Facebook</a></li>
                <li><a href="http://www.yahoo.com" accesskey="y">Yahoo</a></li>
                <li><a href="http://www.gmail.com" accesskey="g">Gmail</a></li>
            </ul>
        </nav>
    </body>
    </html>

    In the above example in navigation links there are different accesskey are used for different links.

     

     

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: