The Style Attribute
With the style attribute, you can fully customize the visual presentation of your websites, from typography and colors to layout and more.
<p style="color:green">Green paragraph.</p>
The style attribute can be used to define properties like color, font size and alignment.
The style attribute can make your life a whole lot easier when it comes to formatting. You can customize multiple properties at the same time. Just separate each property:value pair with a semicolon (;).
<h1 style="color:blue ; text-align:center">Centered BlueHeading </h1>
You can control the font size with the font-size property.
The background-color property is useful for styling elements like the button.
The border property require multiple values.
The border property is a short and simple way to refer to 3 different sub-properties. That’s why it can take 3 values.
border-width
border-style
border-color
The only required border sub property is border-style. If the width is not specified, the default value will be “medium”. If color is not specified, the color of the text will be applied to the border.
<h2 style="border:dotted">dotted</h2>
<h2 style="border:dashed">dashed</h2>
<h2 style="border:solid">solid</h2>
<h2 style="border:double">double</h2>
<h2 style="border:inset">inset</h2>
<h2 style="border:outset">outset</h2>