A2Zmenu.Com
Blog
Tutorials
Online Exam
Ask Question
Utility
Fun @ Work
Wiki
Contact Us
About Us
Loading
Home
Blogs
AJAX
ASP.NET
BI
CSharp
JavaScript
LINQ
Miscellaneous
MVC
SQL
SharePoint
Silverlight
WCF
Tutorials
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Online Exam
ASP.NET
LINQ
Silverlight
SQL
JavaScript
SharePoint
Forum
Utility
Fun @ Work
Appraisal
Funny Images
Funny Puzzle
Miscellaneous
Motivating Stories
Life Vs Work
Wiki
Contact Us
HTML5
ASP.NET 4.0
CSharp
SharePoint
SQL Function
Test Your Skill
Q. Which of the following input type was not introduced with HTML5.
URL
Search
multiple
Email
View all questions...
Canvas Element Overview
HTML 5 came up with new element
<canvas>
. This is a HTML tag similar to other tags already present in HTML with difference that content of canvas
is rendered with JavaScript. That directly implies that you need to have JavaScript enabled to view the features of canvas element. Canvas currently support 2D animation.
Below is the skeleton of a canvas that is the building block for any application of Canvas.
<
html
>
<
body
>
<
canvas
id
="cavId"
width
="400"
height
="300"
style
="
border
:1px solid #000;">
Sorry! your browser does not support Canvas.
</
canvas
>
<
script
type
="text/javascript">
window.onload =
function
() {
var
c = document.getElementById(
"cavId"
);
var
cxt = c.getContext(
"2d"
);
}
</
script
>
</
body
>
</
html
>
getContext('2d')
is the most important method of canvas and provides the drawing context. Currently Chrome, Safari and Firefox 3.0+ and IE 9.0 support canvas element. Check if your browser has
HTML5 support
.
<< Previous
Next >>
Add Comment
Comment
Name
(Required)
E-mail
(Privacy assured)
(Required)
Subscribe to this site by email
Poll of the Day
Q.
Best Smart Mobile Phone in market?
I-Phone
Samsung
Nokia
Others
Related Contents
Online Test Papers
ASP.NET
JavaScript
LINQ
SharePoint
Silverlight
SQL
Related Tutorials
HTML 5 Tutorial
SharePoint Best Practice
How to add ribbon button in SharePoint list and library
List Join operation in SharePoint 2007 / 2010
ASP.NET 4.0 Tutorials
Fun @ Work
Keep smiling always
Developer Vs Tester
There are solutions, even to the hardest problems
Corporate Cartoons
Golden words of steve jobs
Top Blogs
SharePoint 2010 Modal Dialog
How to call webservice using Ajax or JavaScript
Microsoft OLE DB Provider for ODBC Drivers error 80004005
Using SQL SWITCH CASE Statement
Validation of viewstate MAC failed. If this application is hosted...
Creating a Windows Service in C#
Using InstallUtil to install/uninstall service
Each GROUP BY expression must contain at least one column that is not an outer reference
How to add ribbon button in SharePoint list and library
Client side onselectedindexchanged or onchange event in RadioButtonList
Arithmetic overflow error
Pass Data from Parent window to ChildWindow
Silverlight: ListBox with CheckBox
Tablix headers not repeating in SSRS 2008
LINQ to SQL Best Practice
Calling JavaScript function from C#
The contract name could not be found in the list of contracts implemented by the service
Like To Connect With US
x