IDs and Classes can be mixed up a lot if you do not know what you are doing. You cannot use an ID more than once in an XHTML document or it renders the page invalid. A perfect use for this would be for a banner. Classes on the other hand were designed for to be used multiple times on a page. An ideal class would be for a content heading used numerous times.

To make an ID in the CSS you must start it off with the pound sign (#). Classes begin with a period (.)

CSS Code

#id {

}

.class {

}

XHTML Code

<div id=”id”></div>
<div class=”class”></div>