Credit cards offer much more protection against theft and fraud for online purchases. In case of a buyer dispute, the funds have already left your bank account. That is not the case if you use a credit card.
Keep your debit card for local purchases, when it is more convenient than carrying lots of cash. Use your credit card for online electronic payments.