I learned web development through online courses, books, blogs and podcasts. There are many approaches to learning software development and while no one path is "best" there may be an approach that is best for you. In my experience, what's most important is a plan for success, a passion for knowledge, a commitment to learn, and the persistence and discipline required to fulfill your educational goals.