accesskey - HTML CSS HTML Global Attribute

HTML CSS examples for HTML Global Attribute:accesskey

Introduction

The accesskey attribute sets one or more keyboard shortcuts that will select the element on the page.

The following code shows how to use the accesskey Attribute

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>  
<html>  
    <head>      
        <title>Example</title>  
    </head>  
    <body>  
       <form>  
            Name: <input type="text" name="name" accesskey="n"/>  
            <p/>  
            Password: <input type="password" name="password" accesskey="p"/>  
            <p/>  
            <input type="submit" value="Log In" accesskey="s"/>  
       </form>  
    </body>  
</html>  <!--from ww w  . ja v  a  2 s  .  c  o m-->

The key combination required to trigger the accesskey setting varies between platforms, on Windows, it is the Alt key and the accesskey value pressed together.


Related Tutorials