HTML Style is used to change or add the style on HTML document or element such as color, font, background color, text alignment, size, etc. 

Syntax:-
style="property: value"

HTML Style Color

The Style color is used to define a text color.

Example:-

<!DOCTYPE html>
<html>
<body>
<p>HTML Language Study (Default Color)</p>
<p style="color:red;">HTML Language Study</p>
<p style="color:green;">HTML Language Study</p>
<p style="color:blue;">HTML Language Study</p>
</body>
</html>

Output:-








HTML Style Background Color
  
The Style Background color is used to define a text Background color.

Example:-

<!DOCTYPE html>
<html>
<body>
<h1>HTML Language Study (Default Color)</p>
<h1 style="background-color:red;">HTML Language Study</h1>
<h1 style="background-color:green;">HTML Language Study</h1>
<h1 style="background-color:blue;">HTML Language Study</h1>
</body>
</html>

Output:-









HTML Style Text or Font Size

The Style Font-size is used to define a text size in Document.

Example:-

<!DOCTYPE html>
<html>
<body>
<h1 style="font-size:300%;">HTML Language Study (Heading)</h1>
<p style="font-size:300%;">HTML Language Study (Paragraph)</p>
</body>
</html>
Output:-






HTML Style Font Family

The Style Font-family is used to define a font family of HTML Tag.

Example:-

<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:Times New Roman">HTML Language Study</h1>
<p style="font-family:arial">HTML Language Study</p>
</body>
</html>

Output:-







HTML Style Text Alignment

The Style text alignment is used to define a horizontal text alignment for HTML Document.

Example:-

<!DOCTYPE html>
<html>
<body>
<h4 style="text-align:left;">HTML Language Study</h4>
<h4 style="text-align:center;">HTML Language Study</h4>
<h4 style="text-align:right;">HTML Language Study</h4>
</body>
</html>
Output:-