Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
You are here: Reference > HTML > attributes > style

style attribute

Browser support:
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.

Possible values:

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:
<a style="background-color:red">Background-color:red</a>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content