!important is a way to override CSS specificity. In general it’s not the best solution since the more you use it, the more you end up needing to use it again. It can make your CSS unmaintainable in a hurry. It can be useful due to a quirk in IE. When you have something like the following
browsers should show the h1 with a color red. IE, however will show the style that comes last instead of following the rules of precedence. So the code would show your h1 as red in all browsers except IE where the color would be blue.
You need to login to post a comment.