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

Chapter 4. CSS Selectors > Advanced Pseudo-Elements

Advanced Pseudo-Elements

The first-line and first-letter pseudo-elements select a part of an element (discussed in the section, “The first-letter and first-line pseudo-elements”). The before and after pseudo-elements go further: They actually add new parts to an element. Here are a few examples. (The full discussion can be found in Chapter 6.)

The before and after pseudo-elements are used together with the content property, which determines what text goes into the pseudo-element. The first example adds the word “Note” in front of every paragraph of class “note”:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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