Tutorials References Exercises Bootcamp Menu
Sign Up Create Website Get Certified Pro

HTML accesskey Attribute


Two hyperlinks with specified accesskeys:

<a href="https://www.w3schools.com/html/" accesskey="h">HTML</a><br>
<a href="https://www.w3schools.com/css/" accesskey="c">CSS</a>
Try it Yourself »

Definition and Usage

The accesskey attribute specifies a shortcut key to activate/focus an element.

The accesskey attribute value must be a single character (a letter or a digit).


Using accesskeys is difficult because they may conflict with other key standards in the browser.

To avoid this problem, most browsers will use accesskeys only if pressed together with the Alt key.


Adapting accesskeys to all international languages are difficult.

The accesskey value may not be present on all keyboards.

Because of these concerns, it is advised not to use accesskeys.

Browser Support

accesskey Yes Yes Yes Yes Yes


<element accesskey="character">

Attribute Values

Value Description
character A single character that specifies the shortcut key to activate/focus the element

Related Pages

HTML Tutorial: HTML Attributes

HTML DOM reference: accessKey Property