I wanted to connect my Pi to Dell S2240L (monitor). The monitor has HDMI port as well as DVI, but I don't know how to connect them together. And which is better HDMI or DVI? Is it possible to connect them with a HDMI to HDMI cable? Let me know the best option available. Price is not a concern.
Buy an HDMI/HDMI cable. It's the simplest solution.
HDMI-HDMI cable is the best option.
It is cheapest when compared to HDMI-DVI cable or HDMI-VGA converter etc., Advantage is via HDMI-HDMI you get audio as well. Some Monitors also have RCA slot. Disadvantage in using RCA cable is resolution of screen is very bad.
To answer the second half of your question, which is better, HDMI or DVI, there is really only one difference. Both use the same video compression, the difference is audio. DVI only supports video, HDMI also supports HD Audio of various compression schemes. If you will be using audio from your Pi, use HDMI, otherwise, use whatever cable you can find at the best value, and whatever is more convenient. I would think that either way you could find a single cable that does not require any adapters.
HDMI cable will be the way to go, that way you'll get the audio through it as well. using a DVI would mean you'd have to get S-Video/VGA converters.
The best way is by connecting it to a TV with a HMDI port, if that is not available try an older TV (or some current TVs) with the yellow cable.
If you're like me and that's too awkward, or you don't have a space screen with those ports, and you have a spare conventional monitor, grab yourself a HMDI to VGA converter. I bought mine for around £5, it doesn't work for things like your PS3 or Apple TV, but works fine for the Raspberry Pi.
I would just use HDMI. DVI will require you to buy some converters which you don't want to do. Also HDMI is easier because it carries sound unlike DVI.