Difference between revisions of "Canvas Element"

From Level Access Web Labs
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
<canvas id="myCanvas">
 
<canvas id="myCanvas">
 
  <p>There is a green box on the screen.</p>
 
  <p>There is a green box on the screen.</p>
 +
</canvas>
 +
 +
<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');
 +
ctx.fillStyle='#00FF00';
 +
ctx.fillRect(0,0,90,90);
 +
var canvas=document.getElementById('myCanvas3');
 
var ctx=canvas.getContext('2d');
 
var ctx=canvas.getContext('2d');
 
ctx.fillStyle='#00FF00';
 
ctx.fillStyle='#00FF00';
Line 11: Line 25:
 
</script>
 
</script>
 
</html>
 
</html>
 +
 
==Test results for canvus-==
 
==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.
 
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.
 
[[Category:HTML5]]
 
[[Category:HTML5]]
 
[[Category:Elements]]
 
[[Category:Elements]]

Latest 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.