+ 3

In what conditions we can use inline/embedded/external CSS?

I am new to CSS, And i wanna know how to choose one of this..,or which one should i focus more..

13th May 2017, 11:59 AM
SanketB
SanketB - avatar
4 Answers
+ 7
It depend mainly of the quantity of css code... In a first time, it's more useful to embed it, as you can work on once file, but quickly, it's more easy to handle linked files ^^
13th May 2017, 12:07 PM
visph
visph - avatar
+ 7
Yes, but avoid inline css ( with 'style" attribute in html tags ), except at development time for testing purpuse, and at debug time... else it must be reserved to JS use. Leaving some 'style' attribute is valid anyway, but it's not recommended and a bad habits regarding separation of data and style ^^
13th May 2017, 12:14 PM
visph
visph - avatar
+ 2
u mean if CSS code is not lengthy go for inline/embedded if lengthy go external CSS ?
13th May 2017, 12:09 PM
SanketB
SanketB - avatar
+ 2
Always have your CSS in external file, except for building HTML mail in which only allow inline css.
13th May 2017, 12:14 PM
CalviŐ˛
CalviŐ˛ - avatar