Sodium, Na
atomic number = 11
Electronic configuration = 1s2 2s2 2p6 3s1
Since last electron goes to 3s-orbital hence it belongs to 3rd period.
Magnesium, Mg
atomic number = 12
Electronic configuration = 1s2 2s2 2p6 3s2
Since last electron goes to 3s-orbital hence it belongs to 3rd period.
Aluminium, Al
atomic number = 13
Electronic configuration = 1s2 2s2 2p6 3s2 3p1
​​Since last electron goes to 3p-orbital hence it belongs to 3rd period.