A bachelor's degree in computer science or a related field would be better because the employers typically look for individuals with experience in IT. However, it is not mandatory but you can become a web developer with any bachelor’s degree. If you have certifications from reputed institutes, it helps to validate your expertise and you can stand out in the industry.
If you want to learn web development from top instructors, you can check out these Web Development Online Courses by Intellipaat.
You can check this YouTube tutorial to get started: