Types - User Defined
User defined style/css for html tags
Explanation
Here user defines his own style and uses it anywhere he wants.
Example:
<head>
<style>
.mystyle1
{
color: green;
background-color: orange;
}
</style>
</head>
The names used for user defined styles should not belong to any html tag. We set the style for the tag using the attribute "class".
Example1:
<head>
<style>
.mystyle1
{
color: green;
background-color: orange;
}
</style>
</head>
<font class=mystyle1> MY STYLE </font>
<font class=mystyle1> MY STYLE </font>
Result:
MY STYLE
Example2:
<head>
<style>
.mystyle1
{
color: green;
background-color: orange;
}
</style>
</head>
<a href="index.php" class=mystyle1> MY STYLE </a>
<a href="index.php" class=mystyle1> MY STYLE </a>
Result: