A chlorine atom has seven valence electrons, two chlorine atoms bond so that each atom has an octet of valence electrons by covalent bonding. The two chlorine atoms stick together is that the shared pair of electrons is attracted to the nucleus of both chlorine atoms. Hope this answers the question. Have a nice day.