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>  


Categories: web designing css

Trending Courses

CodeIgniter

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Advance Digital Marketing

Regular : 6 Months

Fastrack : 3 Months

Crash : 2 Months

React JS

Regular : 45 Days

Fastrack : 20 Days

Crash : 7 Days

Laravel

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Front End Developer

Regular : 7 Month

Fastrack : 4 Month

Crash : 2 Month

Related Blogs

Request For Demo