Edit in JSFiddle

var ctx = document.querySelector('#c').getContext('2d');
ctx.lineWidth = 20;
ctx.lineCap = 'square';
ctx.lineJoin = 'round';
ctx.strokeStyle = 'black';

ctx.strokeRect(10, 10, 346, 230);






<canvas id=c width=366 height=250></canvas>
canvas {border: 1px solid #ccc;background:#eee}