HTML Global Attributes

HTML Global Attributes refers to attributes that can be used on all HTML elements.

This is a list of HTML global attributes that can use in all the HTML elements.

  • accesskey – To specify the shortcut key.
  • id – Add CSS id for an element.
  • class – Ad CSS class for an element.
  • contenteditable – To specify the element is editable or not
  • hidden – To hide the element.
  • contextmenu – To create a context menu for the element.
  • dir – Elements text directionality.
  • draggable – To specific whether the element is draggable.
  • lang – To define the content language of the element.
  • spellcheck – To check whether the element has spelling or grammar error.
  • style – Add inline CSS style for an element.
  • tabindex – To define the element tabbing order.
  • title – To add extra information of the element.

Leave a Comment