Affiliate link
HTML - Styles
Styles are used to control the elements's appearance. Example, the element's width, height, color, font, and more.
HTML Styles Attributes
Set the element's style by using the style attribute with CSS property.
Example
<p style="color: red">Google</p>
<p style="color: blue">Google</p>
<p style="font-size:30px;">Large font</p>Code result
Large font
Affiliate link
Background
Example
<div style="width: 100px;height:100px;background-color: red"></div>
<p style="width: 100px;height:100px;background-color: lightblue">Blue is nice.</p>Code result
Blue is nice.
Affiliate link
Affiliate link


