HALOGENS have 7 electrons in their final shell regardless if the total number of atoms. These 7 electrons would be shared between the 's' and 'p' orbital in the form ns² np⁵ (the same as the question). Attached is a table that highlights the fact that halogens have the same form in terms of the valence electrons.