Tuesday, August 18, 2009

Import

* As well as embedding and linking CSS to an HTML document, we can also import it.
* In order to use the import command we need to use the style element.
* Inside the style element we would put @import url(location of CSS file);
* Importing the CSS is different from linking the CSS as it uses CSS syntax not XHTML.
* Both methods are correct practise and work equally well in most cases.
* Linking is better if you want to specify an alternative style sheet or interact with the CSS using Javascript.
* Importing is better if you want to hide the CSS from older browsers that don't support it or if you want to improve the structuring of multiple CSS files.

No comments:

Post a Comment