Setting the Foreground Color

color property sets the foreground color of an element.

            p { 
                padding: 5px; 
                border: medium double black; 
                background-color: lightgray; 
                font-family: sans-serif; 
            #myID { 
                font-size: x-large; 
                border: medium solid white; 
                background-color: green; 
                color: rgba(255, 255, 255, 0.7); 
            a:hover { 
                color: red; 
        <span id="myID">CSS</span>
        <a href=""></a> 
Click to view the demo
  HTML CSS Book 

Foreground Color Opacity:
  1. Setting the Foreground Color
  2. Setting Element Opacity