<button accesskey="">
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Attribute of
- Creating A Button With The HTML Button Element: Here's How
- What does
<button accesskey="">
do? - Defines an keyboard shortcut for the button. As of HTML5, this is a global attribute that can be used on any element.
Code Example
<button accesskey="h" onclick="alert('You clicked the button.')">First, click me and see what happens.</button>
<br><br>
Try:<br>
<kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>H</kbd>
<br><b>OR</b><br>
<kbd>alt</kbd> + <kbd>H</kbd>
<br><b>OR</b><br>
<kbd>alt</kbd> + <kbd>shift</kbd> + <kbd>H</kbd>
Try:
ctrl + alt + H
OR
alt + H
OR
alt + shift + H
The [accesskey
] is actually a global attribute, and can be used on any element.