Applying Styles and Colors in html canvas
Applying Styles and Colors on Stroke The default color of the stroke is black and its thickness is one pixel. But, you can set the color and width of the stoke using the strokeStyle and lineWidth property respectivley. The following example will draw an orange color line having 5 pixels width. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Setting Stroke Color and Width on the Canvas</title> <style> canvas { border: 1px solid #000; } </style> <script> window.onload = function() { var canvas = document.getElem...