PSEUDOCLASS SYNTAX

B y adding the declaration float:left, we can turn the first-letter into a drop cap. Notice that I've used backgrounds for these first-letter techniques. Because the box in which a letter sits is larger than the letter itself, using a background (even just a color) and a border helps make the feature look better.

The first-line pseudo-element can only be attached to a block-level element.

The first-line pseudo-element is similar to an inline-level element, but with certain restrictions. Only the following properties apply to a :first-line pseudo-element: font properties, color properties, background properties, word spacing, letter spacing, text-decoration, vertical-align, text-transform, line-height, text-shadow, and clear.

By definition, all letters in a smallcap font are capitalized; however the shift key produces a larger size. I happened to use text-transform here, set to Capitalize and smallcaps as the font-variant. Since I used the text-transform: capitalize; it made the first letter of each word uppercase.

Visit My Website