"Digital" refers to electronic technology where data is represented as numbers, such as computers, CD/DVD players, cable and TV decoders, etc. Computers and the Internet are definitely digital, but digital doesn't necessarily imply either of them. "Online" refers to digital technology that is connected to an external network, such as Internet-connected computers and the Internet itself.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.