Code
Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy HTML Canvas lineWidth Property</title> </head> <body> <h2>Wikitechy HTML Canvas lineWidth Property</h2> <canvas id="wikitechyCanvas" width="200" height="200" style="border:2px solid red;"></canvas> <script> var lw = document.getElementById("wikitechyCanvas"); var lwx = lw.getContext("2d"); lwx.lineWidth = 15; lwx.strokeRect(25, 25, 85, 100); </script> </body> </html>
Result