'HTML accesskey attribute'

WBOY
Release: 2023-09-02 20:53:01
forward
1055 people have browsed it

The accesskey attribute in HTML is used to set the shortcut key for activating or focusing elements.

The following is the syntax -

<element accesskey="char">
Copy after login

Above, char is the shortcut key.

On Windows, set access keys for different browsers −

< tr>< /tr>
Web browserWindows operating system
Safari[Alt] Shortcut key
Chrome[Alt] Shortcut key
Firefox[Alt] [Shift] accesskey

Now let’s see an example on Windows Implementing the accesskey attribute on the Google Chrome web browser -

Example

Real-time demonstration

<!DOCTYPE html>
<html>
<body>
<h2>Reference Links</h2>
   <a href="https://www.tutorialspoint.com/online_dev_tools.htm" accesskey="t">Tools</a><br>
   <a href="https://www.tutorialspoint.com/codingground.htm" accesskey="c">Online Compiler</a><br>
   <a href="https://www.tutorialspoint.com/whiteboard.htm" accesskey="w">Whiteboard</a><br>
<p>Use <kbd>ALT </kbd> + <kbd>accesskey</kbd> on Chrome</p>
</body>
</html>
Copy after login

Output

"HTML accesskey 属性"

The above is the detailed content of 'HTML accesskey attribute'. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!