HTML Global Attributes
HTML global attributes refer to the attribute common to all HTML elements although they may have no effect on some elements. Global attributes specified on both standard and non-standard elements.
List of Global Attributes:
|It is the keyboard shortcuts to activate/focus specific elements.
|It is used to capitalize the text entered/edited by the user automatically.
|The autofocus attribute in HTML is used to specify that the element should get focus when the page
loads. It is a boolean attribute.
|It specifies one or more class names for an HTML element.
|It is used to specify whether the content present in the element is editable or not. When this
attribute is not set in an element, this element will inherit from its parent element.
|It is the id of a <menu> that provide contextmenu for this element.
|It can be used to define our own custom data attributes.
|It is used to specify the text direction of the element content.
|It is used to specify whether an element is draggable or not. Links and images are by default draggable.
|It provides a hint on what label or icon to present on a virtual keyword while pressing keys.
|It is used to define the visibility of elements. It contains a boolean value. If this attribute is used then
browsers will not display elements that have the hidden attribute specified.
for a unique element.
|It is used mainly to provide a hint to browsers on which virtual keyboard configuration to use when editing this element or its contents.
|It specifies that standard HTML behaves as a registered custom built-in element.
|It is a global identifier of an item that is unique.
|It adds properties to an item.
|It works with item types to ensure that the HTML contained in a block is about a particular item.
|It specifies the URL vocabulary which is used to define itemprops.
|It is used to specify the language of the element content. Some examples of languages are en for English, es for Spanish, etc.
|It is a cryptographic nonce (“number used once”) used by a content security policy to check given fetch allowed to proceed or not.
|It is a space-separated list of the part names of the element.
|It is used to assign a slot in a shadow DOM shadow tree to an element.
|The Spell Check feature in HTML is used to detect grammatical or spelling mistakes in the text fields.
|Style in HTML are basically rules that describe how a document will be presented in a browser.
|It is used to specify the tab order of an element. It is used when the tab button is used for navigating.
|It is used to define the title of an HTML document, sets the title in the browser toolbar, and provides the title for the web page when it is added to favorites.
|The translate attribute in HTML is used to specify whether the content of an element is translated or not.
Share your thoughts in the comments
Please Login to comment...