A more modern way of adding events to elements is with the addEventListener() method. Add the click event and tap on the element.

Make sure to pick addEventListener.