SlideShare une entreprise Scribd logo
1  sur  22
 Ofir Fridman
 FE Developer
 Love code, technology, sport
 The HTML <canvas> element is
used to draw graphics
 The <canvas> element is only a
container for graphics. You must
use a script to actually draw the
graphics.
 Canvas has several methods for
drawing paths, boxes, circles, text,
and adding images.
 SVG stands for Scalable Vector
Graphics
 The HTML <svg> element is a
container for SVG graphics.
 SVG has several methods for
drawing paths, boxes, circles, text,
and graphic images.
Canvas SVG
Script - Drawing via code Document - Drawing via XML
Rendered pixel by pixel Scalable Vector Graphics
No support for event handlers Support for event handlers
Better performance Poor performance when to many
items
 Games
 Chart & Graphs
 Advertising
 Logos
 Chart & Graphs
 Icons
(0,0)
X
Y
<canvas id="canvas">
This Browser Not Support
</canvas>
var canvasElement = document.getElementById("canvas");
var canvas = canvasElement.getContext("2d");
canvas.font = "50px arial";
canvas.fillText("Hello World", 10, 50);// (text, x, y)
canvas{
border:1px solid;
width: 50%;
height: 50%
}
HTML
JS
CSS
Paths
Method Description
fill() Fills the current drawing (path)
stroke() Actually draws the path you have defined
beginPath() Begins a path, or resets the current path
moveTo() Moves the path to the specified point in the canvas, without creating a
line
closePath() Creates a path from the current point back to the starting point
lineTo() Adds a new point and creates a line from that point to the last specified
point in the canvas
clip() Clips a region of any shape and size from the original canvas
quadraticCurveT
o()
Creates a quadratic Bézier curve
bezierCurveTo() Creates a cubic Bézier curve
arc() Creates an arc/curve (used to create circles, or parts of circles)
arcTo() Creates an arc/curve between two tangents
isPointInPath() Returns true if the specified point is in the current path, otherwise false
lineTo signature context.lineTo(x,y);
var canvasElement = document.getElementById("canvas");
var canvas = canvasElement.getContext("2d");
canvas.beginPath();
canvas.moveTo(10, 10);
canvas.lineTo(80, 10);
canvas.stroke();
canvas.beginPath();
canvas.moveTo(80, 10);
canvas.lineTo(80, 100);
canvas.stroke();
canvas.beginPath(); //begins a path, or resets the current path
canvas.lineWidth = 5;
canvas.strokeStyle = "red"
canvas.moveTo(80, 100);
canvas.lineTo(200, 100);
canvas.stroke();
rect signature context.rect(x,y,width,height);
var canvasElement = document.getElementById("canvas");
var canvas = canvasElement.getContext("2d");
canvas.rect(20,20,100,100);
canvas.fillStyle="#0000FF";
canvas.fill();// Fills the current drawing (path)
canvas.lineWidth = 5;
canvas.strokeStyle = "#00FF00";
canvas.stroke(); //Actually draws the path you have defined
arc signature context.arc(centerX,centerY,radius,startAngle,endAngle,counterclockwise);
Start angle
End angle
Center x,y
var canvasElement = document.getElementById("canvas");
var canvas = canvasElement.getContext("2d");
var centerX = canvasElement.width / 2;
var centerY = canvasElement.height / 2;
var radius = 50;
var startAngle = 0;
var endAngle = 2 * Math.PI;
canvas.beginPath();
canvas.arc(centerX, centerY, radius, startAngle, endAngle);
canvas.stroke();
 1 HTML Canvas element
 1 moving arc
 1 moving paddle (mousekeyboard)
 25 bricks colorful bricks
<svg height="200" width="200">
<text x="50" y="50" fill="red">Healow World</text>
Sorry, your browser does not support SVG.
</svg>
HTML
Result
<svg height="200" width="500">
<polyline points="20,20,100,20,100,120,200,120"
style="fill:none;stroke:red;stroke-width:3" />
</svg>
HTML
Result
<svg width="400" height="110">
<rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />
Sorry, your browser does not support SVG.
</svg>
HTML
Result
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="red" stroke-width="2" fill="blue" />
Sorry, your browser does not support SVG.
</svg>
HTML
Result

Contenu connexe

Tendances

Tendances (20)

Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Html
HtmlHtml
Html
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Css box-model
Css box-modelCss box-model
Css box-model
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
The Complete HTML
The Complete HTMLThe Complete HTML
The Complete HTML
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 

En vedette

HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
yarcub
 
Html5 canvas & svg 2012 dcc
Html5 canvas & svg 2012 dccHtml5 canvas & svg 2012 dcc
Html5 canvas & svg 2012 dcc
takwhan kim
 

En vedette (20)

Canvas - HTML 5
Canvas - HTML 5Canvas - HTML 5
Canvas - HTML 5
 
ES6
ES6ES6
ES6
 
HTML 5_Canvas
HTML 5_CanvasHTML 5_Canvas
HTML 5_Canvas
 
HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
Html5 canvas & svg 2012 dcc
Html5 canvas & svg 2012 dccHtml5 canvas & svg 2012 dcc
Html5 canvas & svg 2012 dcc
 
HTML5 & SVG in Cartography - Workshop
HTML5 & SVG in Cartography - WorkshopHTML5 & SVG in Cartography - Workshop
HTML5 & SVG in Cartography - Workshop
 
SVG For Web Designers (and Developers)
SVG For Web Designers (and Developers) SVG For Web Designers (and Developers)
SVG For Web Designers (and Developers)
 
Working With Canvas
Working With CanvasWorking With Canvas
Working With Canvas
 
Canvas & Charts
Canvas & ChartsCanvas & Charts
Canvas & Charts
 
HTML CANVAS
HTML CANVASHTML CANVAS
HTML CANVAS
 
Interactive Vector-Graphics in the Browser
Interactive Vector-Graphics in the BrowserInteractive Vector-Graphics in the Browser
Interactive Vector-Graphics in the Browser
 
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
 HTML Canvas tips & tricks - Lightning Talk by Roman Rodych HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
 
【J-SHIS】地震の発生確率と地震動の超過確率
【J-SHIS】地震の発生確率と地震動の超過確率【J-SHIS】地震の発生確率と地震動の超過確率
【J-SHIS】地震の発生確率と地震動の超過確率
 
UI/UX Design
UI/UX DesignUI/UX Design
UI/UX Design
 
UX 101: A quick & dirty introduction to user experience strategy & design
UX 101: A quick & dirty introduction to user experience strategy & designUX 101: A quick & dirty introduction to user experience strategy & design
UX 101: A quick & dirty introduction to user experience strategy & design
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
 
What is UX, in 10 Slides
What is UX, in 10 SlidesWhat is UX, in 10 Slides
What is UX, in 10 Slides
 
UI / UX Design Presentation
UI / UX Design PresentationUI / UX Design Presentation
UI / UX Design Presentation
 
What is ux?
What is ux?What is ux?
What is ux?
 

Similaire à HTML 5 Canvas & SVG

Html5 Canvas Drawing and Animation
Html5 Canvas Drawing and AnimationHtml5 Canvas Drawing and Animation
Html5 Canvas Drawing and Animation
Mindfire Solutions
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
Bitla Software
 

Similaire à HTML 5 Canvas & SVG (20)

Drawing with the HTML5 Canvas
Drawing with the HTML5 CanvasDrawing with the HTML5 Canvas
Drawing with the HTML5 Canvas
 
Advanced html5 diving into the canvas tag
Advanced html5 diving into the canvas tagAdvanced html5 diving into the canvas tag
Advanced html5 diving into the canvas tag
 
Css5 canvas
Css5 canvasCss5 canvas
Css5 canvas
 
Plunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s beginPlunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s begin
 
Html canvas
Html canvasHtml canvas
Html canvas
 
HTML5 Canvas - Basics.pptx
HTML5 Canvas - Basics.pptxHTML5 Canvas - Basics.pptx
HTML5 Canvas - Basics.pptx
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
 
HTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the WebHTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the Web
 
Intro to HTML5 Canvas
Intro to HTML5 CanvasIntro to HTML5 Canvas
Intro to HTML5 Canvas
 
SVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the PaintersSVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the Painters
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
canvas_1.pptx
canvas_1.pptxcanvas_1.pptx
canvas_1.pptx
 
Html5 Canvas Drawing and Animation
Html5 Canvas Drawing and AnimationHtml5 Canvas Drawing and Animation
Html5 Canvas Drawing and Animation
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
canvas.pptx
canvas.pptxcanvas.pptx
canvas.pptx
 
Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3
 
How to make a video game
How to make a video gameHow to make a video game
How to make a video game
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
 
Visualizing Data with JavaScript and Canvas
Visualizing Data with JavaScript and CanvasVisualizing Data with JavaScript and Canvas
Visualizing Data with JavaScript and Canvas
 

Dernier

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 

Dernier (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 

HTML 5 Canvas & SVG

  • 1.
  • 2.  Ofir Fridman  FE Developer  Love code, technology, sport
  • 3.  The HTML <canvas> element is used to draw graphics  The <canvas> element is only a container for graphics. You must use a script to actually draw the graphics.  Canvas has several methods for drawing paths, boxes, circles, text, and adding images.  SVG stands for Scalable Vector Graphics  The HTML <svg> element is a container for SVG graphics.  SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
  • 4. Canvas SVG Script - Drawing via code Document - Drawing via XML Rendered pixel by pixel Scalable Vector Graphics No support for event handlers Support for event handlers Better performance Poor performance when to many items
  • 5.
  • 6.
  • 7.  Games  Chart & Graphs  Advertising  Logos  Chart & Graphs  Icons
  • 9.
  • 10. <canvas id="canvas"> This Browser Not Support </canvas> var canvasElement = document.getElementById("canvas"); var canvas = canvasElement.getContext("2d"); canvas.font = "50px arial"; canvas.fillText("Hello World", 10, 50);// (text, x, y) canvas{ border:1px solid; width: 50%; height: 50% } HTML JS CSS
  • 11.
  • 12.
  • 13. Paths Method Description fill() Fills the current drawing (path) stroke() Actually draws the path you have defined beginPath() Begins a path, or resets the current path moveTo() Moves the path to the specified point in the canvas, without creating a line closePath() Creates a path from the current point back to the starting point lineTo() Adds a new point and creates a line from that point to the last specified point in the canvas clip() Clips a region of any shape and size from the original canvas quadraticCurveT o() Creates a quadratic Bézier curve bezierCurveTo() Creates a cubic Bézier curve arc() Creates an arc/curve (used to create circles, or parts of circles) arcTo() Creates an arc/curve between two tangents isPointInPath() Returns true if the specified point is in the current path, otherwise false
  • 14. lineTo signature context.lineTo(x,y); var canvasElement = document.getElementById("canvas"); var canvas = canvasElement.getContext("2d"); canvas.beginPath(); canvas.moveTo(10, 10); canvas.lineTo(80, 10); canvas.stroke(); canvas.beginPath(); canvas.moveTo(80, 10); canvas.lineTo(80, 100); canvas.stroke(); canvas.beginPath(); //begins a path, or resets the current path canvas.lineWidth = 5; canvas.strokeStyle = "red" canvas.moveTo(80, 100); canvas.lineTo(200, 100); canvas.stroke();
  • 15. rect signature context.rect(x,y,width,height); var canvasElement = document.getElementById("canvas"); var canvas = canvasElement.getContext("2d"); canvas.rect(20,20,100,100); canvas.fillStyle="#0000FF"; canvas.fill();// Fills the current drawing (path) canvas.lineWidth = 5; canvas.strokeStyle = "#00FF00"; canvas.stroke(); //Actually draws the path you have defined
  • 16. arc signature context.arc(centerX,centerY,radius,startAngle,endAngle,counterclockwise); Start angle End angle Center x,y var canvasElement = document.getElementById("canvas"); var canvas = canvasElement.getContext("2d"); var centerX = canvasElement.width / 2; var centerY = canvasElement.height / 2; var radius = 50; var startAngle = 0; var endAngle = 2 * Math.PI; canvas.beginPath(); canvas.arc(centerX, centerY, radius, startAngle, endAngle); canvas.stroke();
  • 17.  1 HTML Canvas element  1 moving arc  1 moving paddle (mousekeyboard)  25 bricks colorful bricks
  • 18.
  • 19. <svg height="200" width="200"> <text x="50" y="50" fill="red">Healow World</text> Sorry, your browser does not support SVG. </svg> HTML Result
  • 20. <svg height="200" width="500"> <polyline points="20,20,100,20,100,120,200,120" style="fill:none;stroke:red;stroke-width:3" /> </svg> HTML Result
  • 21. <svg width="400" height="110"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> Sorry, your browser does not support SVG. </svg> HTML Result
  • 22. <svg width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="red" stroke-width="2" fill="blue" /> Sorry, your browser does not support SVG. </svg> HTML Result