HTML5 Global Attributes

HTML5 Global Attributes

HTML5 global attributes are common to all HTML elements; they can be used on all elements, though they may have no effect on some elements.

The following table provides a list of all HTML5 Global Attributes.

AttributeValueExplanation
accesskeycharacterSpecifies a keyboard shortcut for the current element
classnameSpecifies grouping of any element.
contenteditableboolSpecifies whether the content of the element is editable.
data-*nameSpecifies a custom attribute, it is used for grouping elements within its parent element.
dir
  • ltr
  • rtl
  • auto
Specifies the text direction for the content in an element.
draggableboolSpecifies whether an element is draggable.
hidden-Specifies that the element will not be visible.
idnameSpecifies a unique id for an element.
langlanguage_codeSpecifies the language of an element.
spellcheckboolSpecifies whether the content of the element have to check spelling.
styleCSS PropertiesSpecifies an inline CSS style for an element.
tabindexnumberSpecifies the tabbing order of an element
titletextSpecifies addition information about an element

HTML5 Deprecated Global Attributes

The following table provides a list of all HTML5 Deprecated Global Attributes.

Note: These attributes should not be used in your webpages in any case.

AttributeValueExplanation
autocapitalize
  • off or none
  • on or sentences
  • words
  • characters
Specifies whether and how text input is automatically capitalized.
contextmenuIDSpecifies the id of a <menu> to use as the contextual menu for this element.
dropzone
  • copy
  • move
  • link
Specifies whether dragged and dropped data should be copy, move or link.
translateboolSpecifies whether to translate an element when the page is localized.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author