Is it legal to practice hacking websites as long as you are a student of cybersecurity

No, it is not legal to hack websites without permission, even if you are a student of cybersecurity. Hacking into websites without authorization is a violation of laws such as the Computer Fraud and Abuse Act in the United States. It is important to obtain proper authorization before conducting any kind of security testing or ethical hacking activities.