I want two classes with different names to have the same property in CSS. I don’t want to repeat the code.

.abc {
   margin-left:20px;
}  
.xyz {
   margin-left:20px;
}
<a class="abc">Lorem</a>
<a class="xyz">Ipsum</a>

Since both classes are doing the same thing, I should be able to merge it into one. How can I do that?

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *