CSS: / Home / StyleAttribute

The Style Attribute

The "Style" attribute provides the properties needed to modify the presentation of an HTML document. For example:

An h5 element using the "text-align:center" style property

A style is called an "Inline" Style when the "Style" attribute is added directly to an element. As in:
<h5 style="text-align: center">Centered h5<h5>

A Style property is separated from its value with a colon. As in: "text-align: center".

The Style attribute can contain a list of properties and values separated with semicolons. As in:
<h5 style="background: lightsteelblue; text-align: center">Blue Centered h5<h5>

More Information

<- DeprecatedItems            StyleElement ->
2StyleAttribute