# CodeMirror 2: HTML5 preview

<!doctype html> <html> <head> <title>HTML5 canvas demo</title> <meta charset=utf-8> </head> <body> <canvas id=tutorial width=250 height=250></canvas> <script> var canvas = document.getElementById('tutorial'); var context = canvas.getContext('2d'); context.fillStyle = 'rgb(250,0,0)'; context.fillRect(10, 10, 55, 50); context.fillStyle = 'rgba(0, 0, 250, 0.5)'; context.fillRect(30, 30, 55, 50); </script> </body> </html>