there are 3 ways of using css:
[ol]
[li]Use a seperate (linked or imported) stylesheet:
[tt]<link rel="stylesheet" type="text/css" href="mycssfile.css">[/tt][/li]
[li]Declare the css in the head:
[tt]<style type="text/css">
/* all your css declarations go in here */
</style> [/tt][/li]
[li]Declare the css inline on an element:
[tt]<a href="somelink.html" style="font-weight: bold;">some link text</a>[/tt][/li]
[/ol]
Method 1 will result in the client making a seperate Get request to the server (for the css file).
Methods 2 and 3 won't require extra loading, but they'll increase the file size of the html document, so loading of the page may be slower.
In general, css replaces complex presentational markup, reducing the amount of html by a huge factor - and reducing download time of the html page by the same factor.
If you share a common css file amongst all the files on your site, the browser will generally have cached the file - hence, it will be much much quicker.
<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.