![]() |
Definition and UsageThe accesskey attribute specifies a shortcut key to activate/focus an element. Note: The way of accessing the shortcut key is varying in different browsers:
However, in most browsers the shortcut can be set to another combination of keys. Tip: The behavior if more than one element has the same access key differs:
Applies toThe accesskey is part of the Global Attributes, and can be used on any HTML element.
|
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<a href="https://horje.com/sub/31/196/html" accesskey="h">HTML tutorial</a><br>
<a href="https://horje.com/sub/31/364/css" accesskey="c">CSS tutorial</a>
<p>The accesskey attribute specifies a shortcut key to activate/focus an element.</p>
<p><strong>Note:</strong> The shortcut is varying in different browsers:</p>
<ul>
<li>Edge, IE, Chrome, Safari, Opera 15+: [ALT] + <em>accesskey</em></li>
<li>Opera prior version 15: [SHIFT] [ESC] + <em>accesskey</em></li>
<li>Firefox: [ALT] [SHIFT] + <em>accesskey</em></li>
</ul>
</body>
</html>
html accesskey attribute |
How to add HTML accesskey Attribute | HTML Attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 109 |
Reffered: https://www.w3schools.com/tags/ref_attributes.asp