Use CSS Selector to Change Color of Text Highlight - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Use CSS Selector to Change Color of Text Highlight

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">
::selection {<!--  www  .j a v a2 s .  c  om-->
   background-color:Chartreuse;
   color:yellow;
}
</style> 
 </head> 
 <body>
   some text  
 </body>
</html>

Related Tutorials