https://www.w3schools.com/css/tryit.asp?filename=trycss3_gradient-linear_rainbow <!DOCTYPE html> <html> <head> <style> #grad1 { height: 55px; background-color: red; /* For browsers that do not support gradients */ background-image: 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> </html> |