|
Sections: Introduction | Section 1 | Section 2 | Section 3 |
Section Two: Part A | Part B | Part C | Part D | Part E | Part F | Part G | Part H | Part I |
Understanding Class Selectors The Anatomy of a Class SelectorThe example image below displays the type selector code that was used in a previous example. Note that the selector itself is simply: h1 which correlates the to <h1> HTML tag. A class selector differs from a type selector in that it first begins with a period [ . ] immediately followed by a class selector name (a word or words listed one after the other without a space between). Class Selector NamesCreating appropriately formatted class selector names is very important. If you fail to create your class selector names using the appropriate naming protocols, the formatting changes expected from the class selectors you created will not be visible in your web page. The naming protocols of class selector names are listed below:
See the table below for class selector names that have been formatted correctly and those that have been formatted incorrectly. The far right column explains what’s wrong with the incorrect class selector name. |
© 2008 KCDL. All rights reserved. |