What is !important Property in CSS
!important property in CSS is used to override the previously written CSS property of an element. The !important property in CSS is used to give more weight than normal property. The !important keyword means this is important it ignores all the properties of CSS that are written for an element.
!important keyword placed at the end of a CSS property. It is mostly used when we work on the bootstrap framework because there is a bootstrap CSS file; sometimes we have to override some property of bootstrap CSS.
Syntax:
Element
{
font-size: 14px !important;
color:#f00 !important;
}
Example:
<!DOCTYPE html>
<html>
<head>
<title>!important property in css </title>
<style>
h1 {
color: blue ;
}
h1 {
color:red !important;
}
</style>
</head>
<body>
<h1>Web Development Institute</h1>
</body>
</html>