How to use Accesskey Attribute in HTML5

In this article I am going to explain about Accesskey attribute in HTML5.
  • 3645

Accesskey Attribute in HTML5

Accesskey attribute is an global attribute in HTML. Global means its can be use on any HTML element. Use of Access key attribute for make shortcut key for active to any element. After create short key we can access element by using "shift + Alt + shortcut key name".

Browser that supports Accesskey Attribute

Internet explorer, Mozilla firefox, Google chrome and Safari browsers.

Syntex

<ElemnetName accesskey="Any Char">

Example

<html>

<body>

<a href="http://http://www.c-sharpcorner.com" accesskey="c">c-sharpcorner.com</a><br />

<a href="http://http://www.dotnetheaven.com" accesskey="d">dotnetheaven.com</a>

 

<p><b>press Shift+Alt+c for go C-sharpcorner.con and press Shift+Alt+d for go dotnetheaven.com</b></p>

 

</body>

</html>

Output

accesskey.jpg

Further Readings

You may also want to read these related articles: here
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

 

 

© 2019 DotNetHeaven. All rights reserved.