[11/16, 10:29 AM] <B.ISAH/>👊🏼👊🏼🤜🏼🤜🏼: <!
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Canvas Example</title>
</head>
<body>
<canvas id="myCanvas" width="400" height="200"></canvas>
<script src="script.js"></script>
</body>
</html>
[11/16, 10:29 AM] <B.ISAH/>👊🏼👊🏼🤜🏼🤜🏼: body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
canvas {
border: 1px solid #000;
[11/16, 10:29 AM] <B.ISAH/>👊🏼👊🏼🤜🏼🤜🏼: document.addEventListener("DOMContentLoaded", function () {
// Get the canvas element and its context
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
// Draw a rectangle on the canvas
ctx.fillStyle = "#FF0000"; // Fill color: red
ctx.fillRect(50, 50, 100, 75); // Rectangle coordinates (x, y, width, height)
});