Earth-like planets have anelastic mantles, whereas giant planets may have anelastic cores. As for the fluid parts of a body, the tidal dissipation of such solid regions, gravitationally perturbed by a companion body, highly depends on its internal friction, and thus on its internal structure. Therefore, modelling this kind of interaction presents a high interest to provide constraints on planet interiors, whose properties are still quite uncertain. Here, we examine the equilibrium tide in the solid central region of a planet, taking into account the presence of a fluid envelope. We first present the equations governing the problem, and show how to obtain the different Love numbers that describe its deformation. We discuss how the quality factor Q depends on the rheological parameters, and the size of the core. Taking plausible values for the anelastic parameters, and examinig the frequency-dependence of the solid dissipation, we show how this mechanism may compete with the dissipation in fluid layers, when applied to Jupiter- and Saturn-like planets. We also discuss the case of the icy giants Uranus and Neptune.