The most comprehensive summary of HTML5 global attributes
Local attributes and global attributes
In this article we will share with you the most complete summary of HTML5 global attributes. First, we need to know what attributes are. Properties are divided into local properties and global properties, which we will briefly introduce.
Local attributes: Some elements can specify their own attributes, which are called local attributes. <br>For example, the link element has six local attributes: href, rel, hreflang, media, type, and sizes. <br>Global attributes: Can be used to configure behaviors common to all elements. This attribute is called a global attribute and can be used on any element.
1. Accesskey attribute
Use the accesskey attribute to set one or several shortcut keys for selecting elements on the page.
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>HTML全局属性测试</title> </head> <body> <form action=""> <p> Name: <input type="text" name="name" id="" accesskey="n"> </p> <p> Password: <input type="password" name="password" id="" accesskey="p"> </p> <p> Name: <input type="submit" name="" id="" value="Log In" accesskey="s"> </p> </form> </body> </html>
In the above example, the accesskey attribute is added to the three input elements, so that you can use the Control + Alt (Option) + n shortcut key to access the Name input box on Mac. The key combinations used to trigger the accesskey mechanism vary by platform, as follows:
Browser/Platform | Window | Linux | Mac |
---|---|---|---|
Firefox | Alt + Shift + key | Alt + Shift + key | Control + Alt + key |
Alt + key | N/A | N/A | |
Alt + key | Alt + key | Control + Alt + key | |
Alt + key | N/A | Control + Alt + key | |
Same as Google Chrome | Same as Google Chrome | Same as Google Chrome |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.