Put two different colors behind a heading using css - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Color

Description

Put two different colors behind a heading using 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">

h2 {background-color:#C61236;
color:#FFFFFF;
font-size:medium;
line-height:1.5;
border-left: 20px solid yellow;}


      </style> 
 </head> <!--from  w w w  .  j  a va 2 s. c  o m-->
 <body> 
  <h2>a heading</h2> 
  <h2> </h2>  
 </body>
</html>

Related Tutorials