html5 Flashcards

1
Q

Create a Canvas
A canvas is a rectangular area on an HTML page, and it is specified with the <canvas> element.</canvas>

A

<canvas> style="border:1px solid #000000;"&gt;<br></br> </canvas>

<script>
<br/>	var c=document.getElementById(&quot;myCanvas&quot;);<br/>	var ctx=c.getContext(&quot;2d&quot;);<br/>	ctx.fillStyle=&quot;#FF0000&quot;;<br/>	ctx.fillRect(0,0,150,75);<br/>
</script>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly