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:


<font class=mystyle1> MY STYLE </font>

Result:


MY STYLE

Example2:


<a href="index.php" class=mystyle1> MY STYLE </a>

Result:


Ask Questions

Ask Question