Prev Demo
HTML5
>
Gradients
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Linear gradient</title> </head> <body> <h2 style="color:darkslateblue"><i>Linear Gradient</i></h2> <svg width="300" height="300" style="border:2px solid navy"> <linearGradient id="grad6"> <stop offset="5%" stop-color="blue" /> <stop offset="70%" stop-color="red" /> </linearGradient> <rect x="10" y="100" width="100" height="100" stroke="green" stroke-width="5" fill="url(#grad6)" /> </svg> </body> </html>
Note: We DO NOT save your trial code in our database.
Output