Numerous recent developments in diamond-cell techniques are making possible a growing range of studies of the electronic and magnetic properties of materials to megabar pressures. We review recent advances in this area, including magnetic susceptibility, electrical conductivity, and synchrotron-based spectroscopic techniques. Highly sensitive magnetic susceptibility techniques have allowed the first observations of superconductivity at megabar pressures, including the observation of a Tc of 17 K in sulfur at 160 GPa, and a nearly pressure-independent Tc to above 230 GPa. The technique has recently been extended to allow measurements of the magnetic properties of ferromagnetic substances. Advances in the direct measurement of electrical conductivity using miniaturized leads have permitted measurements on H2O and Xe to above 100 GPa. Pressure-induced high-spin to low-spin transitions have been examined in FeS and FeO using new high-resolution X-ray emission techniques. New high-pressure inelastic scattering methods, including nuclear inelastic scattering techniques, have been used to determine the phonon density of states of Fe to above 150 GPa.