HTML style attribute
HTML style attribute gives style to the content using CSS properties.
Attribute values
All possible values of style attributeThe value of this attribute contains CSS properties. The syntax to write properties in style attribute is given below.
attribute-name is present with colons (:). And the value of this attribute is present with semi-colons (;).
The following are the common attributes to style text.
background-color: red; indicates the red background color.
color: gray; defines the color of text.
font-size: 18px; defines the size of text.
font-family: papyrus; defines the font-family of text.
Related Tags
The tags that support style attributeThe style attribute can be applied on all HTML elements.