How is the use of CSS ( body { background-color: red; } ) faster than specifying the attribute in the HTML code ( <body bgcolor="red"> )?
Thanks for any help provided.
How is CSS faster than ...
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Just a clue: maybe because the CSS file is saved to the browser's cache and then it does not need to be reloaded. Considering you are using a CSS file, something like:and other pages of your application make use of it.
Regards,
Scorphus.
Code: Select all
<link rel="stylesheet" type="text/css" href="sc_style.css" />Regards,
Scorphus.
The only way that I know that a CSS is faster is when it comes to design issues. It makes it easier to change multiple pages in one file then in all of them.
In case you do not like your webpage with a background color of red you can go to the CSS and change the color to blue.....and....wam bam .... it's done through out the entire site!
In case you do not like your webpage with a background color of red you can go to the CSS and change the color to blue.....and....wam bam .... it's done through out the entire site!