HTML style Attribute
Example
<p style="color: tomato;font-family: monaco">This is a paragraph</p>
Meaning
The style attribute specifies an inline style associated with an element, which determines the rendering of the affected element.
The style attribute allows style rules to be used directly with the element, it gives up much of the benefit of style sheets that divide the presentation of a markup document from its structure.
Standard Syntax
<element style="styleDefinitions">
Browser Support
Status
Applies to:
The style attribute can be used on the following element:
Attribute Values
Value | Description |
---|---|
styleDefinitions | Specifies the "inline" way of applying style properties. (e.g. style="color:red;text-align:center") |