HI WELCOME TO SIRIS

HTML Global Attributes

Global Attributes

  • HTML global attributes are CSS ID attribute, CSS class attribute, style attribute, title attribute.
AttributesValueDescription
idelement_idDeclared unique id name for particular element.
classclassnameDeclared class name, you can use same class name one or more elements and to apply CSS property all of them.
stylepropertiesWrite a CSS properties in inline presented HTML element.
titledescriptionTo show "tooltip" message for a element.

CSS ID

  • CSS ID attributes is use for assign a individual HTML element to identifier unique element id. Selected element using id you are assign any type style using CSS properties.
  • The ID selector use the HTML elements, and it is defined with a hash("#").
If you use CSS ID name in single elements than syntax first hash("#"), user defined ID name or property value
#ID-Name { property: value; }

If you use CSS ID name in multiple elements than syntax write this like first elements name, hash("#"), user defined ID name or property value
Element#ID-Name { property: value; }

CSS class

  • CSS class use to assign an elements and change individual selector class property value easy modify or change. CSS class syntax like dot(".") with class name.
  • CSS Class allows you to set a particular style for any HTML elements with the same class.
If you use class name in single elements than syntax write this like first dot("."), user defined class name or property value.
.Class-Name { property: value; }

If you use class name in multiple elements than syntax write this like first elements name, dot(.), user defined class name or property value.
Element.Class-Name { property: value; }