Global HTML Attributes

Attributes provide additional information about HTML elements. Global attributes can be used on any HTML element.

  • id: Uniquely identifies an element
  • class: Assigns one or more class names for styling
  • style: Adds inline CSS styles
  • title: Adds tooltip text on hover
<p id="intro" class="highlight" title="Hover text">Hello World</p>
← PrevNext →