Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <canvas id="canvasExample">Your browser doesn’t support the HTML5 canvas element.</canvas> <script> var c=document.getElementById('canvasExample'); var ctx=c.getContext('2d'); ctx.fillStyle='#1c87c9'; ctx.fillRect(10,50,80,80); </script> </body> </html>