Thursday, July 17, 2008

The Difference Between ID and Class - CSS-Tricks

The Difference Between ID and Class - CSS-Tricks: "We need to ways to describe content in an HTML/XHTML document. The basic elements like



    will often do the job, but our basic set of tags doesn’t cover every possible type of page element or layout choice. For this we need ID’s and Classes. For example
      , this will give us the chance to target this unordered list specifically, so that we may manipulate it uniquely to other unordered lists on our page. Or we might have a section on our page that has no relevant tag to signify it, for example a footer, where we might do something like this:
      . Or perhaps we have boxes in our sidebar for keeping content over there separated in some way:


Post a Comment

<< Home