Here’s a statistic for you. Online sales are up 16.7% year-on-year according to the Office for National Statistics. That’s a serious shift in spending behaviour. As such, it may be worth investors asking whether their portfolios should have some exposure to companies that generate a vast proportion (if not all) of their earnings online. Let’s look at three examples.

Why so serious?

One beneficiary of this trend has been pure-play clothing retailer Boohoo.Com (LSE: BOO). Its shares have doubled in value from the start of the year. This significant rise means the company now has a market cap of just under £1bn – quite a turnaround for a stock that was jettisoned from many investors’ portfolios back in January 2015 following a shock profit warning.

While share prices never move in a straight line, I’d be surprised if Boohoo’s failed to rise further, especially as a recent trading update made reference to the the board anticipating interim results (due at the end of September) to be “above expectations” following robust demand and sales momentum in the first quarter.

While trading on what appears to be a sky-high forecast price-to-earnings (P/E) ratio of 55, this is still less than than the P/E of its biggest online competitor, ASOS (LSE: ASC) at 63. At roughly a quarter of the latter’s size, I’d argue that Boohoo offers more upside potential.

Gearing up for growth?

With a market cap of just £33m, York-based Gear4music (LSE: G4M) might seem small but it’s already the largest UK-based online retailer of musical instruments and equipment. A favourable trading statement released at the end of July would suggest a bright future ahead. UK sales were up 44% to just over £9m compared to the same four-month period in 2015. Sales growth in Europe was even stronger, jumping 137%. Taken together, Gear4music managed to increase total like-for-like sales by 66%.

The company plans to open its first European Distribution centre before the end of 2016, allowing it to reduce both delivery timescales and costs and thereby offer the same level of service that its UK customers enjoy. July’s update also made reference to the company being “well positioned to take advantage of the short-term export opportunities created by the UK’s EU Referendum vote“.

Gear4music operates in a fragmented market, ripe for consolidation (even if management says that this isn’t the immediate priority). Factor-in its impressive, user-friendly website, bespoke e-commerce platform, large product range and excellent customer feedback and the investment case for Gear4music looks pretty compelling.

Stay for the dividends?

Hostel-focused online booking platform, Hostelworld (LSE: HSW) is another option with the company announcing its interim results earlier this morning. Booking growth was up 16% with 45% of this coming from mobile devices. The company also reported decent growth in emerging markets with bookings to Asian destinations up 30%.

Initial indications suggest that the market is extremely pleased with these figures and the board’s statement that expectations for the full year remain unchanged (despite challenging market conditions following Brexit and recent terrorist attacks). Hostelworld’s share price is up almost 9% this morning.

In addition to its market leading status and the possibility of future growth, Hostelworld’s massively cash-generative business model means it’s able to pay large dividends to shareholders. A yield of around 7%, covered 1.3 times by earnings is certainly appealing in this low-rate world.

The future is online

The UK's love of online shopping and booking shows no sign of slowing down.  As investors, it may therefore pay to devote at least a proportion of our capital to those companies that saw this trend coming and are now starting to reap the benefits, especially those that don't also suffer the hassles associated with having a high street presence.  

However, those with a high street presence can also be winners. If finding companies with excellent growth prospects, whether online or offline, flicks your investing switch, you may wish to read a special FREE report written by the experts at the Motley Fool.  They've found a top British brand that has the potential to go global over time and reward loyal shareholders while doing so.

Click here for your free copy.

Paul Summers owns shares in and Gear4music. The Motley Fool UK has recommended We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.