Advertisement
Home Open Editor ❯

HTML Global style Attribute

Example

<p style="color:tomato;font-family:monaco">This is a paragraph</p>

Try this code ❯

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">


Advertisement

Attribute Values

Value Description
styleDefinitions Specifies the "inline" way of applying style properties. (e.g. style="color:red;text-align:center")
Home Open Editor ❯
Advertisement