New to programming, you should probably get a book, start reading it at the beginning, and do some of the exercises. As soon as you think you understand how to do something, try it on your website. Pretty soon, you'll find you know enough to learn by doing, reading tutorials, etc.
What you want to avoid, whether you choose method 1 or 2, is the idea that you can write your first lines of code as a useful part of a real project. To learn effectively, you have to be willing to implement some examples, experiment, and throw some code away.