In this work we report solvatochromism studies on o-nitroaniline and several N-alkyl-o-nitroaniline derivatives used as solutes in solvent mixtures of an "inert" nonpolar cosolvent, cyclohexane, and THF as a solvent with hydrogen bond acceptor ability. These studies allowed us to establish the competition between inter- and intramolecular hydrogen bond in solutes. This was done by comparing the magnitude of the local inhomogeneity induced by the solute-in-solvent mixture, that is, "preferential solvation," using Suppan's dielectric enrichment model as modified by us to be applied to electronic transitions. Since preferential solvation accounts for dielectric as well as specific interactions while dielectric enrichment only for the former, it was shown by comparison that it is possible to separate both effects and even quantify them. It was deduced that N-alkyl-o-nitroanilines form a strong intramolecular hydrogen bond, which remains unbroken even in polar solvents and hydrogen bond acceptors such as dimethyl sulfoxide. This was also confirmed by solvatochromic studies in pure solvents. On the other hand, a symmetrical dependence of the effects of alkyl substituents and solvents on the shifts of the absorption spectra was observed.