CSS styles are applied in the order they are linked in your HTML code.
So if you had two stylesheets e.g. styles1.css and styles2.css which both target the same element e.g.
styles1.css
body {
background-color: red;
}
styles2.css
body {
background-color: blue;
}
If inside the head section if your HTML, you list your links as this:
Can you guess how the resulting page will be?
The resulting page will be blue.
But if you listed your links like this:
The resulting page will be red.
Essentially both styles are being applied, but the one that's visible at the end is the one applied last.
Top comments (0)