A web developer's main responsibility is to design, build, and maintain websites or web applications, ensuring they are functional, user-friendly, and visually appealing.