I learned by doing my own projects, first I started with plain html und css. After that I want a register/login and want more and more features on my site. So I started googeling and try & error. So I guess the best part is try & error when you have a goal to success