Are You Following the Principles of Top Notch CSS Design?

Cascading Style Sheets – or CSS for short – allows web designers to separate the presentation of their sites from the content. CSS can be used to style any element of your page or place the elements on the page.

CSS can be an extremely powerful markup language for designers.

However, the CSS that is produced is only as good as the principles that are being followed by the designer creating the code.

While you may think that anyone can crank out CSS, there is a big difference between writing CSS and producing top notch CSS.

To ensure that you are on the right track, here are eight CSS principles that every web designer should be following.

Are you following these principles for CSS?

  1. Take the Time to Validate – Many of us take the time to validate  our HTML/XHTML code BUT do we do also validate our cascading style sheets? Is the doctype you use up-to-date and correct?
  2. Document (but not in your code) – Adding comments to your style sheets will help you understand why you did what you did a week or a month from now. It will also help if someone else needs to take over the project at a later date. Adding comments directly to your CSS code will increase the size of the file and, as a result, increase load time. To avoid this, comment your css in a separate file.
  3. Say No to Hacks
  4. Don’t Abuse Divs – Use the appropriate HTML tag instead of automatically creating a new div.
  5. Put Thought Into Your Class Names –
  6. Embrace Shorthand
  7. Don’t Forget About Printers – It’s important to use CSS to make your content printer friendly.
  8. Never Stop Learning – continue to work on learning more about css.

Read Are You Following the Principles of Top Notch CSS Design? in its entirety.

Trackbacks

  1. […] original here: Are You Following the Principles of Top Notch CSS Design … This entry was posted on Sunday, July 11th, 2010 at 5:22 pm and is filed under Uncategorized. […]

Speak Your Mind

*