Creative Style Sheets, more commonly known as its abbreviation - CSS - is a more convenient way of styling div tags and layouts than using styles inside the html.
Say for example that you wanted a box on every page of your website that has a red background. You could use the style option in the html to put that red background on every page you need it on.
Another way would be to give that box the class name 'red' (in reality, you would have a much more recognisable name), and write out that style a single time in the CSS style sheet.
This way, you save memory on your file transfer server, normally on your hosting provider (one.com for me).
Although you have one extra file to upload to the server, instead of writing out that red background style many times, you only write it once. This will reduce the file size of every page significantly, especially when you have a nearly completed website, with lots of different styles.
As the file sizes are smaller, this ultimately means a shorter loading time for your website. This is important because if your website takes ages to load, it could drive potential customers away.
No comments:
Post a Comment