OWASP is a great place to learn about web security. Check out their 2013 PDF, linked on this page [0]: it gives a fantastic overview, including best practices, technical details, and ways to fix issues.
[0]: https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Proje...