Modifying First-Letter and First-Line Text
You can style the first letter of text (a drop cap) and the first line of text using the pseudo element selectors. You haven't seen these yet, so here's a look:
These get attached to the element to which you'd like the style to apply (see Example 9-9).
:first-line
:first-letter
Example 9-9. Using pseudo element selectors to style
In Figure 9-16, I've applied these styles to text.
p:first-line {font-weight: bold; color: #333;}
p:first-letter {font-style: italic; color: #999;}
Figure 9-16. Using pseudo element selectors to create first-line and first-letter styles.
[View full size image]
