Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #grad1 { height: 55px; background: -webkit-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); /* For Fx 3.6 to 15 */ background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet); /* Standard syntax (must be last) */ } </style> </head> <body> <div id="grad1" style="text-align:center;margin:auto;color:#888888;font-size:40px;font-weight:bold"> Gradient Background </div> <p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p> </body> <!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=trycss3_gradient-linear_rainbow by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:23:48 GMT --> </html>
Result:
Try it Yourself - © w3schools.com