function draw(){ var x = 10; var y = 10; var width = 75; var height = 25; var color = 'orange'; var author = 'Abel'; // draw rectangle context.beginPath(); context.rect(x, y, width, height); context.fillStyle = color; context.fill(); context.stroke(); // draw label context.font = '10px Arial'; context.strokeText(author,(x+2),(y+10)); }