HTML attributes tell the browser. Attributes allow
you to make more diverse appearance of information, added using the same tags. The attribute value is enclosed in quotation marks
"". The names and values of the attributes are not case sensitive,
but it is nevertheless recommended that you type them in lower case.
Global attributes
The global attributes shown in the table below can be used for any HTML element, although some of them may not have any effect on the elements.
accesskey | Generates keyboard shortcuts to access the current item. Consists of a space-separated list of characters. The browser first selects the keys that exist on the keyboard layout. |
---|---|
class | Defines the class name for the element (used to define the class in the stylesheet). Accepted values: class name. |
contenteditable | Determines whether the user can edit the content. Allows you to convert any HTML field into an editable element. |
contextmenu | Adds the context menu specified by the tag to the element. |
dir | Determines the direction of the content text in the and elements. Accepted values: ltr / rtl / auto. |
draggable | Determines whether the user can drag an item. Accepted values: true / false / auto. |
dropzone | Defines the area for receiving movable elements, telling the user's browser what actions to perform when moving. Accepted Values: copy - the contents of the moved item will be copied to the area. move - the contents of the moved item will be moved to a new area. link - when moving, a link to the initial data of the element will be created. |
hidden | Indicates that the item should be hidden. Accepted values: hidden. |
id | Defines a unique identifier for an item. Accepted values: id - element identifier. |
lang | Defines the language code of the content in the element. Accepted values: language code. |
spellcheck | Indicates whether the content of the item is subject to spelling and grammar checking. Accepted values: true / false. |
style | Indicates the CSS code used to style the element. Accepted values: CSS code. |
tabindex | Determines the order in which an item is navigated using the TAB key. Accepted values: serial number. |
title | Defines additional information about an element by setting a tooltip for the page. Accepted values: text. |
translate | Enables or disables text translation within an element. Accepted values: yes / no. |
0 Comments