Headings: [Skip]

Web-Design Tutorials by Dr Sam

CSS, the Cascade

Menu [Skip]

Id Attribute

Creating the id styles

Now, let's repeat the classes of styles that we have already created for our examples, and let's add a set of styles for an id as well:

.muff01 { text-align:center; font-family: verdana, sans-serif; }

.muff02 { background-color:#fc0; color:#000; font-weight:bold; }

#tuff00 { background-color:#000; color:#fc0; font-weight:bold; font-size:140%;}

The last one is the one that will be applied to an id. Notice the way it is constructed. See that it begins with a hash mark:

#tuff00

The hash mark is a code. It signifies that the name, which follows it, is the id of a tag somewhere in a document.