Header Ads

Pseudo Elements in CSS3




The :fist-line and :fist-letter pseudo elements allow you to apply styles to the fist line and fist letter respectively.

  • :first-line
                      The :fist-line pseudo element allows you to apply styles to the fist line.


Figure shows an HTML code where the :fist-line pseudo element will be used.




The Code Snippet in the style sheet declares the style that will be applied to the fist line
in the paragraph.

p:fist-line
{
font-family: “Tahoma”;
font-weight: bolder;
background-color: #FFFFCC;
}
Specifies the styles to be applied to the fist line of the paragraph content.

  • :first-letter
               The :fist-letter pseudo element allows you to apply styles to the first letter.

Figure shows an example of the HTML code for the :fist-letter pseudo element.


Explanation for the code shown in figure is as follows:

p:first-letter
Specifies the styles to be applied on the first letter of the paragraph content


                                 Figure shows the output of :fist-letter pseudo element.







No comments:

Powered by Blogger.