IDs are unique, CLASSES can be repeated
 
 

This is not a tip, rather a reminder to the few designers who don’t know the difference between classes and ids. When structuring your document using css, use ids to define styles for the elements that are to be unique in the document, uses classes to style elements having multiple instances.

For example, If you have a div that contains 3 paragraphs of text, 2 of which have the same style (bold, color=green, 14px font-size) and the other having a normal font-weight and color=blue, you may apply css to that document as follows:

  • * For the container div, use and id div#container
  • * For the similar paragraphs, assign them a class .arial14bold
  • * For the different paragraph, assign a class .arial12pxnormal, just in case you’ll have to add the container.

AND DON’T CREATE ANOTHER DIV WITH ID #container in the document.