Account
Categories

What is CSS?


If you apply multiple styles to a single HTML element, CSS uses a rule-based system called the 'cascade' to decide which style takes effect.
This decision is made according to the cascade process, which considers priority from highest to lowest —

inline (style="color: red;"),
internal (.text { color: green; }), and
external (p { color: blue; }).

Hello

  .text { color: green; }


p {
  color: blue;
} 

What will be the output?

Color: red; will be applied because inline CSS has the highest priority,
so it overrides internal and external styles.

You can save the CSS file using the .css extension, for example: filename.css.