CSS Pseudo Element
CSS pseudo-elements are used to apply special effects to selectors that we want.
The first-letter pseudo element styles the first letter of paragraph or block.
Example
<html>
  <head>
 <style type ="text/css">
  p:first-letter
  {
  font-weight: bold;
  font-size: 25px;
  color: green;
  }
  </style>
  </head>
  <body>
  <p>I have a clear goal in life.Every day I am striving to get closer to it.</p>
  <p>I enjoy joy and sorrow equally. My life is more colorful.</p>
  </body>
  </html>
Output
I have a clear goal in life.Every day I am striving to get closer to it.
I enjoy joy and sorrow equally. My life is more colorful.
First letter of the every paragraph apply the above CSS style
No comments:
Post a Comment