CSS Inline Styles


Applying Styles:
Three different ways of placing / applying styles:
Inline style
Embedded style
External style

Inline style:
styles that are placed within the tag itself.
we use style attribute to place inline styles.
value to the style attribute is declaration list.

Note: Inline styles get apply only to that specific tag in which they are declared. And If any property is inheritable in that declaration list, then that property /style will get apply/inherited to its successor tags too.

Limitations of inline style:
If we have many tags with common styles, then we have to copy paste the entire declaration list to every other tag.
That increases the webpage size.
Increase in code size.
Code Redundancy.
No maintainability.
Time consuming.

To overcome this limitation we use embedded styles.

Interview Questions: