Anyone can code.
It's cheaper. You can work at your own pace. Lots and lots of resources are available out there on the net.
Depending on your level of experience, it's easier to get stuck on simple coding tasks if you can't work out the errors. Progress can be slower without guidance. You may not learn the best practice coding techniques from the start and form bad habits.
Different Choices for self-learning on the Internet exist - depending on your level of experience in coding.
Some of the resources online include interactive tutorials, video tutorials, PDF books, example code.
Different people work better with different learning methods and styles and you have to find a method that works best for you.
Below you'll find a few suggested learning paths for web app development depending on your level of coding experience.