• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Creating a Web Page Layout wi... > Setting class and ID selectors

Setting class and ID selectors

The other types of styles are class and ID selectors. Class selectors can be applied to any element in your HTML document. ID selectors can be applied to only one element on a page. There are also differences in how these types of styles are applied.

Class selectors

Class selectors are enhancements to your default styles. You create them if you want to have more than one style of paragraph. For instance, suppose you set your default paragraph to be a straight, black, Verdana type with a margin of 5 pixels, but you also want to have a special paragraph type to emphasize a point. You would create the following styles:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint