Chapter 2: Placing
Style tags can be placed in three ways.
Inline styles are not easy to maintain and they involve a lot of style repetition if the same style is to be used at many places.
Style per page solves the repetition problem but still has two issues:
a) Multiple files cannot share the style embedded in each other.
b) CSS is always served (and parsed by the browser) as part of the html file, even though it has not changed.
Separate file approach is the best one.
It does not involve mixing of style inside HTML code, thus improving readability and maintainability.
If CSS file is not changed, then it can be cached by the browser, thus improving page load performance.
Multiple web-pages can make use of the same CSS file, thus maintaining same look and feel across the site.
|Email:||(Your email is not shared with anybody)|