On page SEO has progressed a lot in last few years. I remember when I started blogging back in the days, it was all about keyword stuffing. If you wanted to rank for cat food, all you had to do was stuff ‘cat food’ (not literally) a thousand time in your article and that would be enough.
I even saw cases where people used to write a normal article and then they put cat food a thousand times under the actual piece and marked it white (on a white background) – good old days.
As you would imagine, ‘tricks’ don’t work forever and Google is now smarter than they were ever before. While off page SEO is very important and crucial for your rankings, I would say on page does 80% of the job.