Sets an inline style associated with an element.
With the style attribute you can assign inline CSS properties to an object. If you want to use the same style settings for several elements, create a style rule and assign it with the class attribute. The style attribute is useful for assigning unique styling rules for the object. To retrieve a style definition in an inline style use the style object.
String that sets the style definition.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the STYLE attribute:
Did you find this example helpful?
Supported by tags:
User Contributed Comments