Usually you can, but it depends on the retailer – it’s their decision. In some cases you may need to pop in-store to use your gift card. There are many other cards that can be used online, however.
If you can’t make it into store, always check before buying to see if your chosen retailer accepts gift cards for online purchases. You’ll find this information in the T&Cs for each gift card in Portfolio Perks.