html canvas tag


  Translation results:

UK[ˈkænvəs] US[ˈkænvəs]

n. Canvas; oil painting (cloth)

vt. Covered with canvas

adj. Made of canvas

Third person singular: canvases Plural: canvases Present participle: canvasing Past tense: canvased Past participle: canvased

html canvas tagsyntax

What does canvas mean?

Function:Define graphics, such as charts and other images.

Description: <canvas> The tag is just a graphics container, which is done through scripts (usually JavaScript). You can use canvas to draw paths, boxes, circles, characters, and add images.

Note: The <canvas> tag is a new tag in HTML 5. Internet Explorer 8 and earlier does not support the <canvas> tag.

html canvas tagexample

<!DOCTYPE HTML>
<html>
<body>

<canvas id="myCanvas">your browser does not support the canvas tag </canvas>

<script type="text/javascript">

var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);

</script>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A