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
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education