DVI has one benefit that HDMI lacks: an ability to use either analog or digital signals. This allows you to connect a computer with DVI output to a monitor with VGA input. Unfortunately, while the age of DVI allows you to use older technologies, it can create problems with newer ones. Issues may be encountered when attempting to play content that uses HDCP encryption, such as full HD Blu-ray and other HD content. You won’t have a problem with this when using HDMI cables.
There are five types of HDMI connectors: A, B, C, D and E. Type A is HDMI 1.0 and is compatible with single-link DVI-D. It uses 19 pins for the connection. HDTV, EDTV, and SDTV all make use of Type A. Type B is also HDMI 1.0 but is compatible with Dual Link DVI-D. 29 Pins are used for the connection of Type B. These extra pins allow for it to be used with higher resolution displays such as WQUXGA.
Type C, the mini connector, is HDMI 1.3 and used by portable devices. This uses 19 pins for connection and is compatible with Type A using a special cable. Type D is HDMI 1.4. It is similar to Type C in that it uses 19 pins, is used for portable devices and is compatible with Type A. It differs in that it uses a micro connector and is capable of higher resolutions. Type E also utilizes HDMI 1.4 but is a niche item used in automotive products almost exclusively. Type E is much more rugged designed to withstand vibrations, jostling, dirt and dust.
DVI has three different connectors: DVI-D, DVI-A, and DVI-I. DVI-D uses a digital format and is predominantly the method for connecting LCD screens to computers utilizing DVI. It offers both single-link and dual-link forms with dual-link offering higher resolutions. DVI-A uses analog transmission and is the preferred method for connecting to older analog monitors. DVI-I exists as a combination allowing for both digital and analog connections. It can replace either a DVI-D or DVI-A cable allowing you to use one cable for both connections.
As far as price is concerned, DVI is, by and large, cheaper than the newer HDMI cables. If we factor in the lack of audio capability of DVI and add in the cost of an audio connection cable, the price gap becomes much smaller. Both connections serve their purpose and should be used based on the need.