Instead of designing a website by saying “here’s the background, it’s green” and “here’s a headline, it’s 20pt Helvetica Bold, centered to the page” and “here’s the body text, 12pt Helvetica” you just design a web page to have parts labeled background and headline and text, and the stylesheet is where you put the attributes, so everything called “headline” looks the same and all the backgrounds look the same etc.
This way, if you want to change how a site looks, you can adjust the style sheet instead of fixing every page individually, which is tough, because with something like PHP, the pages don’t even really exist until you load them, because they are generated on the fly out of existing chunks of code.
Latest Answers