Can i know how can i use 'id','div' and 'canvas' | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can i know how can i use 'id','div' and 'canvas'

that's it

7th Jan 2017, 4:17 PM
Rohit khot
Rohit khot - avatar
3 Answers
+ 6
<div id="div" width="100" height="100"> id's are used to give a unique name to an element allowing you to edit them with CSS/JS easier. As for canvas you have to learn alone… (although i have some example codes on my profile...)
7th Jan 2017, 4:22 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
With as terse as @ValentinHacker, you could describe use of canvas as well: <canvas id="mycanvasname" width="100" height="100"> :P Obviously, more complete answer beyond the scope of this Q&A thread... courses and tutorials provide this kind of help ^^ That's all, folks ! ;)
7th Jan 2017, 4:34 PM
visph
visph - avatar
+ 2
Notice that attributes in html tag elements are deprecated, and is recommended to use css rules instead...
7th Jan 2017, 4:37 PM
visph
visph - avatar