CSS – Cascading Style Sheets – are basically a set of instructions telling a browser how your website is supposed to look. The difference is that CSS separates your design from your content. This gives it a number of advantages over other methods of styling – for one thing, removing all formatting from your html page streamlines your markup and makes the page faster loading. Another plus is that you can position your most keyword-rich content exactly where you want it to be…right at the top where the search engines can gobble it up!
Most websites that are not using CSS to style their pages are using tables. While tables can be very easy to use, they just aren’t meant for designing websites. Tables will, by their very nature, limit your designs in terms of content placement, and depending on who you listen to, nested tables (tables inside tables inside tables) are very difficult for search engines to decipher, not to mention a pain for the browser to load quickly.
So…enter CSS – a language that is built specifically for what it’s used for. Giving elements on your page a class or id (which I talk further about in this post), then assigning styles to that specific class or id in the stylesheet allows you complete control over every aspect of that element, including color, positioning, stacking order, backgrounds etc. Elements with the same attributes that occur multiple times within the document can be assigned the same class or id, preventing lots of repeating markup.
Wait – you haven’t heard the best part yet…
As someone who used to waste a lot of time changing the look of my own websites (it’s addictive, you know!), CSS is a miracle tool. Let’s say you have some text that you originally liked in blue because it’s your favorite color. Well, now you want it to stand out in red…but the text is spread out 200 different times over 10 pages! If you were using CSS, you could have assigned all of that text with the class ‘favorite-color’ and with one little change to your CSS file, made it all red. 2 seconds, all done. Now that’s what got me going with CSS in the first place!
Obviously there’s more to CSS than that, but you get the basic idea. Content in one place, style in another. Easy to update, change and manipulate. Better control over content positioning. Possibly an advantage when it comes to the almighty search engines. What’s not to like??
