Rényi and von Neumann entropies quantifying the amount of entanglement in ground statesof critical spin chains are known to satisfy a universal law which is given by the conformal fieldtheory (CFT) describing their scaling regime. This law can be generalized to excitationsdescribed by primary fields in CFT, as was done by Alcaraz et al in 2011 (see reference [1], of which this work is a completion). An alternative derivation is presented,together with numerical verifications of our results in different models belonging to thec = 1, 1/2 universality classes. Oscillations of the Rényi entropy in excited states are alsodiscussed.