Remember, the last class definition wins!
This post is going to be short and straight to the point! Freecodecamp.com said it best in one of their css challenges, "It doesn't matter which order the classes are listed in the HTML element.
However, the order of the class declarations in the <style> section are what is important. The second declaration will always take precedence over the first."
This means that if you have multiple classes for the same html element. Here's a quick example of this in action. Below, we set the css class on the <h1> element to blue-text and pin-text. The order there doesn't matter at all. What does matter is that in the style (note: inline css is for learning purposes only) the class blue-text is defined after the class pink-text. The same principle apples when defining multiple css files. You must declare them each in a <script> tag, and if properties are defined in more than one class then the <script> tags further down will override those above them.
The posts on this site are written and maintained by Jim Lynch. About Jim...