Today lets learn about line ending properties present in HTML5. The property we're using is lineCap. It has 3 values:…