change first word color through css - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

change first word color through css

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">

div<!-- w w w .ja  v  a2s . c o  m-->
{
   color:orange;
   background-color:#DDD;
}
.color-white
{
   color:#FFF;
}


      </style> 
 </head> 
 <body> 
  <div>
    ' <span class="color-white">test</span> test' 
  </div>  
 </body>
</html>

Related Tutorials