Web dev world chrome is all that's used.
I hear what you're saying about the 27 inch but I would like to have the ability to take it places. The 21.5 seems like it can be more portable.
The 27" iMac is a great machine for web development. We use them almost exclusively at work (a digital design/strategy agency), with the exception of some PCs.
The
latest Safari is faster than Chrome, and offers very similar developer tools. I personally use it, after using Chrome exclusively for several years.
Do
NOT buy your iMac from a local Apple store because it will come with a slow spinning hard drive from the late-90s. Buy it from the online store, and customise the hard drive option to an SSD. Please, please do not buy a spinning hard drive in 2015. The bottleneck is
huge. If you really cannot afford the SSD, compromise with a Fusion drive, but nothing less.
Also, on the 27" you can easily install more RAM from third-parties without voiding any warranties, or even the need for a screwdriver. On the 21", you're stuck with what you get.
The base 27" iMac with a 256GB SSD is $1,999. That's your best option for your budget. Use Thunderbolt external storage if you really need it. If you really need the onboard storage, you can switch for a 1TB Fusion drive at no extra cost. The 1GB GPU would make me a bit nervous about longevity, though. You could always get the next 27" model with a 2GB GPU and 256GB SSD for $2,199 and just go easy on spending elsewhere for a couple of months...
----------
Then just get the baseline 15" rMBP for portability.
A desktop isn't meant to be taken around.
This is a good point.