1.

Explain HTML5 Graphics.

Answer»

HTML5 supports two kinds of graphics:

  • Canvas - It is like drawing on a WHITEPAPER or a blank webpage. We can ADD different graphic designs on web pages with available methods for drawing various geometrical shapes.
<!DOCTYPE HTML><html> <head> </head> <body> <canvas WIDTH="300" height="100" style="border:2px solid;"></canvas> </body></html>
  • SVG - SCALABLE Vector Graphics are used mostly for diagrams or icons. It follows the XML format.
<!DOCTYPE html><html> <body> <svg width="400" height="110"> <rect width="300" height="100" style="fill:#FFF;stroke-width:2;stroke:#000" /> </svg> </body></html>

Both of the above examples produce this output and represent two different approaches provided by HTML5 to implement graphical aspects in the webpage.



Discussion

No Comment Found