Website Design - Why You Should Use CSS
CSS stands for Cascading Style Sheets, and if you are wondering what cascading does here, they have a cascading effect on the web pages they are used on. OK, not a good explanation, but people use the CSS definitions to keep their website design and content separate. Now why would you keep design and content different on a same web page? Good question. And it has a good answer too.
When you separate design from content you can easily change one without affecting the other. You can store all the CSS definitions in an external CSS file (it often has an extension .css). In order to attach a CSS file to a web page you just need to include this single line (let’s assume the name of your file is css-style.css):
<link rel=”stylesheet” type=”text/css” href=”css-style.css” />
All the CSS layout definitions contained inside css-style.css will be applied to your web page. Put this line in the header section (<head></head>) of all your web pages and you’ll have the same style applied to all the pages of your website. This is one big advantage.
Another advantage is that you can have a uniform look across your website with just a couple of lines of CSS definitions. Take for instance this CSS definition:
If this definition is included in a CSS file and if that file is attached to all the pages of your website, the text appearing within <h1></h1> will look the same throughout your website. This matters a lot when you have hundreds of pages.
Using CSS for creating your layouts also encourages you to abandon using the deprecated tags like <font></font>.
Further, CSS tremendously reduces the size of your web pages because all the design definitions reside in a separate file. This is good for your bandwidth cost (it becomes to surface once the traffic increases) and even for SEO because you are doing away with most of the formatting clutter.
With new versions of CSS rapidly evolving and with increasing cross-browser compatibility, not creating CSS-based websites can prove to be a real burden, and a big mistake.