Use ::first-letter selector on a inline elements - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:first-letter

Description

Use ::first-letter selector on a inline elements

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
p {<!--from   w ww . jav a 2 s.co m-->
   display:inline-block;
}

p:first-letter
 {
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <p>Hello</p>  
 </body>
</html>

Related Tutorials