pseudo-elements

Explanation: These CSS declarations (pseudo-elements)  allow you to style elements which actually don’t exist in the HTML code. They should be the subject of a selector (the last item). Examples include :first-line and :first-letter.

Example CSS code:

p:first-letter {
font-size:4em;
font-family:Tahoma;
text-indent: 0px;
line-height:0.8em;
float: left;
padding-right:2px;
}

Example page (view the source code): http://learning-html5.info/CSS3/CSS3_DropCap.html (should work in most modern browsers).

References:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.