Tech stocks have been known to produce great returns in a relatively short amount of time. So much so that they've been almost synonymous with growth stocks for quite some time now. Still, investors need to keep a long-term outlook even when investing in tech stocks. Just because they can produce those types of returns doesn't mean you should go into them expecting that.

If you have $5,000 available to invest, here are three good long-term options. One to provide a high dividend yield, one with great growth potential, and one with a good combination of the two. 

1. AT&T

To call investors pessimistic toward AT&T (T 1.02%) right now would probably be an understatement. The stock is down over 25% year to date as of Aug. 18, continuing what has been a challenging decade or so for the company.

The pessimism surrounding AT&T, while not unwarranted, may be why now is a great time for long-term investors to step into the picture. Not because the stock price has great growth potential, either. It's all about the dividend. AT&T's current quarterly dividend is $0.2775 per share, with a dividend yield of over 7.9%.

Large debt has called investors to question if AT&T's dividend is sustainable, but the company's free cash flow -- which companies use to pay dividends, pay down debts, buy back stocks, and such -- points to those fears being overblown as of its last quarter.

T Dividend Per Share (Quarterly) Chart

Data by YCharts

AT&T's dividend should be a margin of safety for investors as they wait (patiently) for the company to reverse course from previous years. To AT&T's credit, it seems to be doing just that. It has had 12 straight quarters of postpaid phone customer growth and 14 straight quarters of adding at least 200,000 AT&T Fiber net adds.

It's been rocky, but AT&T's customer growth should be encouraging for investors. Especially operating in an indispensable industry like telecom. At current yields, a $1,000 investment in AT&T could pay out around $79 annually.

2. Apple

It's virtually impossible to talk about tech stocks to hold on to for the long term and not include the world's most valuable public company, Apple (AAPL -0.35%). It's a company that needs no introduction.

Although the stock has dropped over 10% in the past month, it's still up roughly 40% year to date, mirroring the rallies of many big tech stocks this year.

While the iPhone (48% of its revenue) and hardware are Apple's foundation, I think its high growth potential comes from the emergence of its services. Apple's services segment has become increasingly important to its revenue, now accounting for 26% of it.

Aside from its core iCloud services, Apple has been eyeing health and financial services as industries it can break into successfully. And to some extent, it already has when you consider Apple Fitness+, Apple Watch capabilities, Apple Pay, and the Apple Card.

What's encouraging about Apple's growth opportunity is that it can essentially buy its way into those industries if it chooses to go that route. In just March 2022, Apple spent $150 million buying U.K. fintech company Credit Kudos. Its over $62.4 billion in cash on hand is more than enough to go acquisition hunting.

If I had $5,000 to invest in these three stocks, I would allocate $2,000 to Apple to take advantage of its long-term growth opportunities. With fewer question marks around Apple than AT&T, I feel comfortable dedicating more to the company.

3. Cisco Systems

Cisco Sytems (CSCO -0.50%) doesn't get as much mainstream love as other big tech companies, but it's been a key part of developing the internet and web infrastructure as we know it today. Cisco's hardware is what has defined the business, creating everything from routers to firewalls to data center products and much more.

More importantly, its products are top-tier in quality, making it the go-to for companies who don't mind paying higher upfront costs to avoid the costlier maintenance costs down the road that can come with lower-quality products.

That pricing power has paid off for Cisco, with its $15.2 billion in revenue for the fiscal fourth quarter (ended July 29) up 16% year over year and 27% in the past three years.

CSCO Revenue (Quarterly) Chart

Data by YCharts

Cisco's profits have outpaced its revenue growth, which could be attributed to its slow but steady transition to higher-margin software products and services. Software and software subscription revenue were up 17% and 20% year over year, respectively.

With a quarterly dividend of $0.39 and a yield over 2.8%, Cisco's stock presents an ideal case of stock growth potential and consistent, reliable dividend income. The company started paying a dividend in 2011 and has increased the yearly payout every year since. It's a good position to be in as a shareholder.

Cisco would get the last $2,000 to take advantage of the best of both worlds. At current yields, it would be around $56 in dividends annually, along with a good upside in its stock price.