Surely some legal actions may be taken but before that content of your resignation letter and subsequent communication/ letters with the HR needs to be considered first before proceeding further.
26th April 2017 From India, Kolkata
As Mr. Ritesh mentioned, please check the relieving clause mentioned in your offer letter. If it reads 2 months notice period or compensation, then you can request your management to accept the compensation. However, as you mentioned you are a web devloper, please check whether you have signed any internal project assurance documents where you agreed to stay till completion of project etc., Said agreement will also stand as a strong proof for the employer to ask you to stay. If nothing singned and you are ready to adhere the clasuses of your offer letter, then you have all rights to request your management. In such case the management wont have any option to force you to stay. If they do so, you can file a legal case against them through your labour department and also through your advocate. But before doing such, please ensure you have all the necessary documents clear to prove your side.
26th April 2017 From India, Madras