Home Web Front-end HTML Tutorial HTML specifies the attribute accesskey of the shortcut key that activates (makes the element focus)

HTML specifies the attribute accesskey of the shortcut key that activates (makes the element focus)

Nov 03, 2017 am 09:34 AM
html element get

Example

Hyperlink with specified shortcut key:

<a href="http://www.w3school.com.cn/html/" accesskey="h">HTML</a><br />
<a href="http://www.w3school.com.cn/css/" accesskey="c">CSS</a>
Copy after login

Browser support

Almost all browsers have accesskey Properties , except Opera.

Definition and Usage

The accesskey attribute specifies the shortcut key for activating (making the element gain focus) the element.

Tips and Notes

Note: The following elements support the accesskey attribute: , ,