I am a little confused about what is an HTML5 canvas. I was told that this is JavaScript, but it seems to be a much larger deal?
How is it different from javascript?
Why is this so amazing?
Are there any other things besides JavaScript?
I suggest you read this HTML5 Canvas article - the basics
But in short. It does not replace javascript.
HTML 5 JavaScript. "" ( ), JavaScript , . API .
canvas - img, javascript.
canvas
img
- , , , ; .
, "" , , - MS Paint, , , . - . , !
Mozilla , .
, Canvas JavaScript! 2 .
Canvas - HTML5, , , , JavaScript. - -.
. , :
<html> <body> <canvas id="c" width="200" height="200" style="border:1px solid"></canvas> <script> var canvas = document.getElementById("c");//get the canvas in javascript var context = canvas.getContext("2d");//getcontext on canvas context.beginPath();//start the path.we are going to draw the line context.moveTo(20,20);//starting point of Line context.lineTo(40,20);//ending point of Line context.stroke(); //ink used for drawing Line (Default: Black) </script> </body> </html>
Source: https://habr.com/ru/post/1737824/More articles:How to Xml serialize LinkedList? - .netLinkedList не может быть сериализован с использованием XMLSerializer - .netfunction binding and clone () function - jQuery - functionjQuery - datepicker - onblur - javascriptIn PHP: How to call the $ variable inside one function that was previously defined inside another function? - functionSoftware fault tolerance accuracy - fault-toleranceHow does the Perl grep function work with regex? - regexAfter creating a managed domain with MVVM / WPF - design-patternsDirectives order [BITS 16] and [ORG 0x0000] - assemblyHow to turn a Java class into one of its subclasses (SocketAddress and InetSocketAddress) - javaAll Articles