Difference between revisions of "Canvas Element"

From Level Access Web Labs
Jump to navigation Jump to search
Line 5: Line 5:
  
 
<canvas id="myCanvas2">
 
<canvas id="myCanvas2">
 +
</canvas>
 +
 +
<canvas id="myCanvas3" role="img" aria-label="canvas">
 
</canvas>
 
</canvas>
  
 
<script>
 
<script>
 
var canvas=document.getElementById('myCanvas');
 
var canvas=document.getElementById('myCanvas');
 +
var ctx=canvas.getContext('2d');
 +
ctx.fillStyle='#00FF00';
 +
ctx.fillRect(0,0,90,90);
 +
var canvas=document.getElementById('myCanvas2');
 
var ctx=canvas.getContext('2d');
 
var ctx=canvas.getContext('2d');
 
ctx.fillStyle='#00FF00';
 
ctx.fillStyle='#00FF00';

Revision as of 22:52, 17 July 2020

There is a green box on the screen.

Test results for canvus-

All screen readers and browsers tested announced that there is a green box on the screen. this is the text that is in the paragraph inside of the canvus.