That depends. Students who are most successful are self-motivated, have clear goals, have set aside appropriate time, and are Web-savvy. Many institutions have a self-assessment tool on their site such as this one to help you gauge your likeliness of success studying online.
Online education enrollment has continued to grow according to the new report, Digital Learning Compass: Digital Education Enrollment Report 2017. The overall enrollment in higher education, however, has fallen in the past three years.