How are the elements divided into s, p, d and f - blocks

How are the elements divided into s, p, d and f - blocks in the modern periodic table ?

Depending upon sub-shells the differentiating electron i.e., the last coming elec-tron enters in the atom of the given elements, the elements are classified as s, p, d and f-block elements. Eg : ${ Na }_{ n }$