how to use canvas tag in html code example

Example 1: how to add an image in html

<img src="Add Image Source Here">

Example 2: how to use the label tag in html

<label for="id_of_what_you're_labeling"></label>

<!-- for example-->
<label for="username"></label>
<input type="text" id="username">

Example 3: canvas tag html

//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);

Tags:

Css Example