+ 1
Why do web developer prefer external css much than internal
7 Answers
+ 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
+ 9
It's cleaner, in my opinion
+ 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.
+ 1
But even in external you use the same format to style as the internal
- 2
@yerucham How