Inputting a default image in case the src attribute of an html img tag is not valid?

I have seen so many blogs on this topic but they haven’t been able to give a straight forward answer and that’s why i have come to make this simple and easy to follow. I have got the right method here for you. Since the first image doesn’t exist, the fallback will display. And if