Tech companies have had a rough 2018 on Wall Street, as have media companies. So it isn't surprising that digital media companies that operate at the junction between media and tech are also having a dismal year.

Facebook Inc. (FB) - Get Report , the most valuable of the tech media companies, is down nearly 25% year to date after peaking at a 25% gain for the year in late July. 

Snap Inc. (SNAP) - Get Report , which was rising 4% Friday, has dropped like a brick since its debut last year. Year to date, the stock is down 62%, and it reached an all-time low of $4.99 a week ago.

Meanwhile, media streaming company Roku Inc. (ROKU) - Get Report has dropped 41% year to date, including a more than 60% decline since it reached its 2018 high of $76.48 in early October. The stock was trading below $30 Friday. And fellow media hardware company TiVo. Corp. (TIVO) - Get Report is down 41% year to date. 

Compare those performances to that of the big four legacy media companies -- CBS (CBS) - Get Report (down 26%), Disney (DIS) - Get Report (flat), Comcast Corp. (CMCSA) - Get Report (down 13%), and Fox (FOXA) - Get Report (up 40%) -- and the gap becomes clearer. 

Not every tech media company was in the doldrums in 2018, however, as Netflix Inc. (NFLX) - Get Report was one of the market's best performers this year. Even though the stock has fallen sharply from its peak above $400 per share, which it reached in July, shares are still up more than 30% year to date. 

"We see NFLX and GOOG (YouTube) as best positioned to benefit from a continued shift of media consumption from traditional to digital given the breadth/depth of their user & content ecosystems (albeit we remain Neutral rated on NFLX given current valuation, lack of visibility on medium-to-long term sub trends, content spend levels to meet competition and the impact it may have on debt levels, & overall risk-off appetite by the market)," UBS analyst Eric Sheridan wrote in a recent note. 

Facebook, Comcast and Disney are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells FB, CMCSA or DIS? Learn more now.