Pros and Cons of CSS


  • Speed of Design
  • Consistency
  • Ease of Use
  • Multipule Browser Support

  • Cons

  • Speed if Coded Wrong
  • Debugging and Complications
  • Ease to Learn
  • Lack of Support on Older Browsers

  • What is "Class" and "ID"


    Class is a selector that selects elements with a special class attribute. To specifiy, add "class" to any div or element in your html and then add a .-insert class name here- to your CSS as such.

    <h3 class="awesome rad">This is awesome</h3="awesome">
    .awesome {

    Classes can be used multiple times throughout your page and multiple can be applied to the same element, just declare them next to each other like shown above with awesome and rad. Just make sure there's a space between each class you declare.


    ID is a lot like Classes yet not. They're declared with id= and not class=. ID can also only be used once per page instead of multiple times like class. The final big difference is in your CSS, instead of declaring the ID with a . it must be declared with a #. An example is shown below on how to use and declare an ID.

    <h3 ID#"awesome">This is awesome</h3="awesome">
    #awesome {

    What is Specificity

    Besides beging a pain to say, it's super important in understanding how CSS workings and debugging it. Specificity is when declaring something in CSS, such as a class, to be as specific as possible when delcaring so whatever you style that part of CSS will only apply to what you put. Probably easier to show than explain, so here is an example of specificity below.

    ul#summer-drinks li.favorite {
    color: red;
    font-weight: bold;

    Notice how the ul and ID are declared then the li and its class. Thats specificty, getting as specific as possible when delcaring code.