+ 1

Why do web developer prefer external css much than internal

4th Jan 2018, 9:00 PM
Musah Mohammed Awal
Musah Mohammed Awal - avatar
5 Respuestas
+ 11
Imagine you got 200+ LOC in CSS and 300+ LOC in HTML. Do you prefer to read a 500+ LOC HTML with using internal CSS or just adding 1 line on top of 300+ LOC from HTML as a reference? (external) Besides, the separation into .html & .css alllows the browser to cache the CSS file without download it every time when the user hit refresh. 😉 P/S: LOC = Line of Code
5th Jan 2018, 2:59 AM
Zephyr Koo
Zephyr Koo - avatar
+ 9
It's cleaner, in my opinion
4th Jan 2018, 9:22 PM
David Akhihiero
David Akhihiero - avatar
+ 4
Zephyr has mentioned the main points. Besides that, separated css files allow us to switch to different page styles easily by just linking to different CSS theme files, eg. we could build lots of theme css files for use later in certain festivals like New year and Christmas, Halloween, national day, etc.
5th Jan 2018, 3:26 AM
Calviղ
Calviղ - avatar
+ 1
But even in external you use the same format to style as the internal
4th Jan 2018, 9:22 PM
Musah Mohammed Awal
Musah Mohammed Awal - avatar
- 2
@yerucham How
4th Jan 2018, 9:24 PM
Musah Mohammed Awal
Musah Mohammed Awal - avatar