Chapter 9



					
						
<!-- figure 9.1 --> <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <title>I am the title</title> <style type="text/css"> /* Solid colors */ p.one { color: rgb(255,255,255); background-color: rgb(255,0,0); } p.two { background-color: hsl(120,100%,50%); } p.three { color: rgb(255,255,255); background-color: rgb(0,0,255); } /* Colors plus opacity */ p.four { color: rgb(255,255,255); background-color: rgba(255,0,0,0.5); } p.five { background-color: hsla(120,100%,50%,0.5); } p.six { color: #ffffff; background-color: #0000ff; opacity:0.5;} </style> </head> <body> <h3>Foreground and background color:</h3> <p class="one">{ color: rgb(255,255,255); background-color:rgb(255,0,0); }</p> <p class="two">{ background-color: hsl(120, 100%, 50%); }</p> <p class="three">{ color: rgb(255,255,255); background-color:rgb(0,0,255); }</p> <br> <p class="four">{ color: rgb(255,255,255); background-color:rgba(255,0,0,0.5); }</p> <p class="five">{ background-color: hsla(120,100%,50%,0.5); }</p> <p class="six">{ color: #ffffff; background-color:#0000ff; opacity: 0.5; }</p> </body> </html>