<!DOCTYPE html> | |
<canvas id ="output" width="100" height="100" style="background: blue;"></canvas> | |
<script> | |
"use strict"; | |
const canvas = document.getElementById('output'); | |
const ctx = canvas.getContext('2d'); | |
ctx.fillStyle = 'green'; | |
ctx.fillRect(0, 0, 100, 100); | |
</script> |