
Concept explainers


HTML5 Canvas Element:
It provides HTML a bitmapped surface to work with it and used to draw the graphics on web page.
It is only a container for graphics and need a scripting language to draw graphics.
It also allows for the dynamic and scriptable rendering of 2d shapes and the bitmap images.
It gives an easy and powerful way to draw the graphics using JavaScript and used to draw the graphs, make the photo compositions or animations.
It have two specific attributes which are width and height, also all the core HTML5 attributes such as id, name and class, etc.
The <canvas> tag is used to draw the graphics using the scripting language such as JavaScript.
Example of <canvas> tag:
<!DOCTYPE HTML>
<html>
<head>
<style>
#example{border:2px solid blue;}
</style>
</head>
<body>
<canvas id = "example" width = "150" height = "150"></canvas>
</body>
</html>
Output of above example:
Step by stepSolved in 2 steps with 1 images

- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT


