With new experimental information on nuclei far from stability being available, a systematic investigation of excitation energies and electromagnetic properties along the $N=10, 11, 12$ isotones and $Z=10, 11, 12$ isotopes is presented. The experimental data are discussed in the context of the appearance and disappearance of shell closures at $N=Z=8,14,16,20$, and compared to an effective-interaction approach applied to neutrons and protons in $d_{5/2}^{2,3,4}$ configurations. In spite of its simplicity the model is able to explain the observed properties.