It is possible to learn both . The best way to learn both of them is to do mini projects. For example if you create a web based chatbot, you would be applying web development skills with machine learning concepts, in this case Natural Language Processing(NLP).