<!DOCTYPE html> <html> <head> <style> canvas { border:1px solid black; } </style> </head> <body> <p>A canvas element is displayed like this:</p> <canvas id="myCanvas">Your browser does not support the HTML5 canvas tag.</canvas> <script> let c = document.getElementById("myCanvas"); let ctx = c.getContext("2d"); ctx.fillStyle = "#FF0000"; ctx.fillRect(0, 0, 80, 100); </script> <p>Change the default CSS settings to see the effect.</p> </body> </html>