Taking a year off from Master program due to severe injury and doing online courses as I am not fit for work.(Future Prospects)
Your future is impossible to predict. But online courses, under the given circumstances seem to be a positive thing, indicating that you are keeping engaged with your studies. But use them well. Remember that just seeing lectures isn't the same as learning. Good online courses will provide ways for you to reinforce the learning (exercises). The best will find a way to give you individual feedback on your work, just as would occur in a face-to-face course. 

But, I think your primary current responsibility is to regain your health, which will make all things possible. 

The people for which gaps are a problem are those who have no reason for it other than lack of focus and commitment. You don't have any issues like that. Good luck and good health.