if you trust yourself to put forth the effort and do the work on your own time, yeah, online courses can work fine
the effectiveness of online courses varies on a case-by-case basis, of course. for example, im extraordinarily apathetic and lazy, so without the traditional classroom setting i'd never get anything done