© ESO, 2015. Planck has mapped the intensity and polarization of the sky at microwave frequencies with unprecedented sensitivity. We use these data to characterize the frequency dependence of dust emission. We make use of the Planck 353 GHz I, Q, and U Stokes maps as dust templates, and cross-correlate them with the Planck and WMAP data at 12 frequencies from 23 to 353 GHz, over circular patches with 10° radius. The cross-correlation analysis is performed for both intensity and polarization data in a consistent manner. The results are corrected for the chance correlation between the templates and the anisotropies of the cosmic microwave background. We use a mask that focuses our analysis on the diffuse interstellar medium at intermediate Galactic latitudes. We determine the spectral indices of dust emission in intensity and polarization between 100 and 353 GHz, for each sky patch. Both indices are found to be remarkably constant over the sky. The mean values, 1.59 ± 0.02 for polarization and 1.51 ± 0.01 for intensity, for a mean dust temperature of 19.6 K, are close, but significantly different (3.6σ). We determine the mean spectral energy distribution (SED) of the microwave emission, correlated with the 353 GHz dust templates, by averaging the results of the correlation over all sky patches. We find that the mean SED increases for decreasing frequencies at ν< 60 GHz for both intensity and polarization. The rise of the polarization SED towards low frequencies may be accounted for by a synchrotron component correlated with dust, with no need for any polarization of the anomalous microwave emission. We use a spectral model to separate the synchrotron and dust polarization and to characterize the spectral dependence of the dust polarization fraction. The polarization fraction (p) of the dust emission decreases by (21 ± 6)% from 353 to 70 GHz. We discuss this result within the context of existing dust models. The decrease in p could indicate differences in polarization efficiency among components of interstellar dust (e.g., carbon versus silicate grains). Our observational results provide inputs to quantify and optimize the separation between Galactic and cosmological polarization.