The characteristics of the intramolecular hydrogen bond (IMHB) for a series of 40 different enols of beta-diketones and their nitrogen counterparts have been systematically analyzed at the B3LYP/6-311+G(3df,2p)//B3LYP/6-311+G(d,p) level of theory. In some cases, two tautomers may exist which are interconnected by a hydrogen shift through the IMHB. In tautomer a the HB donor group (YH) is attached to the six-membered ring, while in tautomer b the HB acceptor (X) is the one that is attached to the six-membered ring. We found that changing an O to a N favors the a tautomer when the atom is endo and the contrary when it is exo, while the presence of a double bond favors the a tautomers. As expected, the OH group behaves as a better HB donor than the NH2 group and the C=NH group as a better HB acceptor than the C=O group, although the first effect clearly dominates. Accordingly, the expected IMHB strength follows the [donor, acceptor] trend: [OH, C=NH] > [OH, C=O] > [NH2, C=NH] > [NH2, C=O]. For all those compounds in which the functionality exhibiting the IMHB is unsaturated (I-type), the IMHB is much stronger than in their saturated counterparts (II-type). However, when the systems of the II-type subset, which are saturated, are constrained to have the HB donor and the HB acceptor lying in the same plane and at the same distance as in the corresponding unsaturated analogue, the IMHB is of similar or even larger strength. Hence, we conclude that, at least for this series of unsaturated compounds, the resonance-assisted hydrogen bond effect is not the primary reason behind the strength of their IMHBs, which is simply a consequence of the structure of the sigma-skeleton of the system that keeps the HB donor and the HB acceptor coplanar and closer to each other.