You can use either online... and the debit cards are usually a bit more effective/easy as they usually don't have spending limits, and the don't charge interest on purchases.... HOWEVER... if you use a debit card, whatever checking account it is linked too is prone to theft... if it is your sole/main account and someone gets your debit card number, they can cause some extensive damage... a credit card is going to have a cap on it... and most spending limits help safe guard against mass theft in one swipe....
That being said... it's not that debit cards are bad to use online... they can just be percieved as not as "secure"....
I would suggest opening a small spending account completely seperate from your main account if you plan to do alot of online shopping... use only the debit card from that spending account to purchase on line goods... and only put in small amounts of money to cover your purchases... this way if someone does get your debit card you aren't loosing all your money, only a partial amount equal to what you placed in your spending account.... and you are free from interest and spending caps that come with a credit card, also no credit checks for those who may have issues...
Some even choose to use those visa gift cards, as they can be recharged, and used just like a debit card... only problem is here, they aren't as convienent as a secondary spending account, and they are prone to loosing money if funds aren't spent withing X amount of time...
Further more... depending on where you setup your secondary spending account, most banks/institutions treat the debit card as a check card... and this allows you to place a stop payment on a certain $ amount or transaction... as opposed to locking out your entire card or account as you have done above...