If you using Angulr2+ then
<canvas id="tutorial" title= {{styleme}} width="150" height="150"></canvas>
//update the value of "styleme" in .ts, changes will reflect automatically
If you using plain HTML and JavaScript then
const canvas = document.getElementById('tutorial');
canvas.setAttribute('title', 'new title')