A brief about HTML5 and <canvas>
HTML5 is a markup language used for
structuring and presenting content on the World Wide Web. It is the fifth and
current version of the HTML standard, published on 2014. HTML 5 has some new
features, like canvas and video audio. Here I would like to give an example
what canvas can do on HTML5.
<canvas> on HTML5 is an element
used to draw graphics, or objects on website using script. So, <canvas>
is only the container to draw. To actually draw the graphics, we must use
script, like JavaScript.
<canvas> has several methods to
draw line, rectangle, circle, character/text, and adding image.
Below are examples of adding image
onto canvas, creating stroke text, and displaying cursor position.
Let’s Try Canvas
Adding Image
onto Canvas