//HTML <canvas id="canv"></canvas> //Javascript var canvas = document.getElementById("canv"); canvas.width = canvas.height = 100; var ctx = canvas.getContext("2d"); ctx.fillStyle = "red"; ctx.fillRect(10, 10, 80, 80);
<div id="capture" style="padding: 10px; background: #f5da55"> <h4 style="color: #000; ">Hello world!</h4> </div>