give preferance from two class on a single Element in HTML

Some time we have two class on singe element like

Text1
Text2

.first{color:red;font-size:12px;}
.second{color:green;font-size:12px;}

and we want that “text1” comes in green then we can use !important in css

.first{color:red;font-size:12px;}
.second{color:green !important;font-size:12px;}

now if class second on a element with another class then color attribute of “second” class will be get preference on another one class.