Browsers give us several ways to display graphics, like styling the elements. But when it comes to drawing graphics such as two lines, the Canvas API is used, which allows you to draw graphics using JavaScript programmatically.
You can draw graphics using JavaScript and the HTML canvas element. In this piece, you will get a small introduction to Canvas API and how you can use it on a website.