<!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <canvas id="memo"></canvas> <script> var canvas = document.getElementById('memo'); var context = canvas.getContext('2d'); context.fillStyle="red"; context.fillRect(0,0,100,100); </script> </body> </html>