<div class="gradient"></div>
body {
    margin: 0  
}

.gradient {
    background: linear-gradient(to top, red 0%, orange 5%, yellow 10%, green 20%, blue 50%, purple 100%);  
    height: 100px;
}    

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.